Skip to main content

Class DuckDbParquetDataReader

Reads Parquet files through DuckDB for files that Parquet.Net cannot decode.

Namespace: Workspace.XBR.Xperiflow.Etl.Tabular

Assembly: Xperiflow.dll

Declaration
public class DuckDbParquetDataReader : IDataReader, IDataRecord, IDisposable

Implements: System.Data.IDataReader, System.Data.IDataRecord, System.IDisposable

Properties​

this[int]​

Gets the column located at the specified index.

Declaration
public object this[int i] { get; }

this[string]​

Gets the column with the specified name.

Declaration
public object this[string name] { get; }

Depth​

Gets a value indicating the depth of nesting for the current row.

Declaration
public int Depth { get; }

IsClosed​

Gets a value indicating whether the data reader is closed.

Declaration
public bool IsClosed { get; }

RecordsAffected​

Gets the number of rows changed, inserted, or deleted by execution of the SQL statement.

Declaration
public int RecordsAffected { get; }

FieldCount​

Gets the number of columns in the current row.

Declaration
public int FieldCount { get; }

Methods​

Read()​

Advances the System.Data.IDataReader to the next record.

Declaration
public bool Read()
Returns​

System.Boolean

true if there are more rows; otherwise, false.

IsDBNull(int)​

Return whether the specified field is set to null.

Declaration
public bool IsDBNull(int i)
Returns​

System.Boolean

true if the specified field is set to null; otherwise, false.

Parameters​
TypeNameDescription
System.Int32iThe index of the field to find.
Exceptions​

System.IndexOutOfRangeException The index passed was outside the range of 0 through System.Data.IDataRecord.FieldCount.

GetValue(int)​

Returns the value of the specified field.

Declaration
public object GetValue(int i)
Returns​

System.Object

The field value.

Parameters​
TypeNameDescription
System.Int32iThe index of the field to find.
Exceptions​

System.IndexOutOfRangeException The index passed was outside the range of 0 through System.Data.IDataRecord.FieldCount.

GetOrdinal(string)​

Return the index of the named field.

Declaration
public int GetOrdinal(string name)
Returns​

System.Int32

The index of the named field.

Parameters​
TypeNameDescription
System.StringnameThe name of the field to find.

GetName(int)​

Gets the name for the field to find.

Declaration
public string GetName(int i)
Returns​

System.String

The name of the field or the empty string (""), if there is no value to return.

Parameters​
TypeNameDescription
System.Int32iThe index of the field to find.
Exceptions​

System.IndexOutOfRangeException The index passed was outside the range of 0 through System.Data.IDataRecord.FieldCount.

GetFieldType(int)​

Gets the System.Type information corresponding to the type of System.Object that would be returned from System.Data.IDataRecord.GetValue(System.Int32).

Declaration
public Type GetFieldType(int i)
Returns​

System.Type

The System.Type information corresponding to the type of System.Object that would be returned from System.Data.IDataRecord.GetValue(System.Int32).

Parameters​
TypeNameDescription
System.Int32iThe index of the field to find.
Exceptions​

System.IndexOutOfRangeException The index passed was outside the range of 0 through System.Data.IDataRecord.FieldCount.

GetBoolean(int)​

Gets the value of the specified column as a Boolean.

Declaration
public bool GetBoolean(int i)
Returns​

System.Boolean

The value of the column.

Parameters​
TypeNameDescription
System.Int32iThe zero-based column ordinal.
Exceptions​

System.IndexOutOfRangeException The index passed was outside the range of 0 through System.Data.IDataRecord.FieldCount.

GetByte(int)​

Gets the 8-bit unsigned integer value of the specified column.

Declaration
public byte GetByte(int i)
Returns​

System.Byte

The 8-bit unsigned integer value of the specified column.

Parameters​
TypeNameDescription
System.Int32iThe zero-based column ordinal.
Exceptions​

System.IndexOutOfRangeException The index passed was outside the range of 0 through System.Data.IDataRecord.FieldCount.

GetBytes(int, long, byte[], int, int)​

Reads a stream of bytes from the specified column offset into the buffer as an array, starting at the given buffer offset.

Declaration
public long GetBytes(int i, long fieldOffset, byte[] buffer, int bufferoffset, int length)
Returns​

System.Int64

The actual number of bytes read.

Parameters​
TypeNameDescription
System.Int32iThe zero-based column ordinal.
System.Int64fieldOffsetThe index within the field from which to start the read operation.
System.Byte[]bufferThe buffer into which to read the stream of bytes.
System.Int32bufferoffsetThe index for buffer to start the read operation.
System.Int32lengthThe number of bytes to read.
Exceptions​

System.IndexOutOfRangeException The index passed was outside the range of 0 through System.Data.IDataRecord.FieldCount.

GetChar(int)​

Gets the character value of the specified column.

Declaration
public char GetChar(int i)
Returns​

System.Char

The character value of the specified column.

Parameters​
TypeNameDescription
System.Int32iThe zero-based column ordinal.
Exceptions​

System.IndexOutOfRangeException The index passed was outside the range of 0 through System.Data.IDataRecord.FieldCount.

GetChars(int, long, char[], int, int)​

Reads a stream of characters from the specified column offset into the buffer as an array, starting at the given buffer offset.

Declaration
public long GetChars(int i, long fieldoffset, char[] buffer, int bufferoffset, int length)
Returns​

System.Int64

The actual number of characters read.

Parameters​
TypeNameDescription
System.Int32iThe zero-based column ordinal.
System.Int64fieldoffsetThe index within the row from which to start the read operation.
System.Char[]bufferThe buffer into which to read the stream of bytes.
System.Int32bufferoffsetThe index for buffer to start the read operation.
System.Int32lengthThe number of bytes to read.
Exceptions​

System.IndexOutOfRangeException The index passed was outside the range of 0 through System.Data.IDataRecord.FieldCount.

GetData(int)​

Returns an System.Data.IDataReader for the specified column ordinal.

Declaration
public IDataReader GetData(int i)
Returns​

System.Data.IDataReader

The System.Data.IDataReader for the specified column ordinal.

Parameters​
TypeNameDescription
System.Int32iThe index of the field to find.
Exceptions​

System.IndexOutOfRangeException The index passed was outside the range of 0 through System.Data.IDataRecord.FieldCount.

GetDataTypeName(int)​

Gets the data type information for the specified field.

Declaration
public string GetDataTypeName(int i)
Returns​

System.String

The data type information for the specified field.

Parameters​
TypeNameDescription
System.Int32iThe index of the field to find.
Exceptions​

System.IndexOutOfRangeException The index passed was outside the range of 0 through System.Data.IDataRecord.FieldCount.

GetDateTime(int)​

Gets the date and time data value of the specified field.

Declaration
public DateTime GetDateTime(int i)
Returns​

System.DateTime

The date and time data value of the specified field.

Parameters​
TypeNameDescription
System.Int32iThe index of the field to find.
Exceptions​

System.IndexOutOfRangeException The index passed was outside the range of 0 through System.Data.IDataRecord.FieldCount.

GetDecimal(int)​

Gets the fixed-position numeric value of the specified field.

Declaration
public decimal GetDecimal(int i)
Returns​

System.Decimal

The fixed-position numeric value of the specified field.

Parameters​
TypeNameDescription
System.Int32iThe index of the field to find.
Exceptions​

System.IndexOutOfRangeException The index passed was outside the range of 0 through System.Data.IDataRecord.FieldCount.

GetDouble(int)​

Gets the double-precision floating point number of the specified field.

Declaration
public double GetDouble(int i)
Returns​

System.Double

The double-precision floating point number of the specified field.

Parameters​
TypeNameDescription
System.Int32iThe index of the field to find.
Exceptions​

System.IndexOutOfRangeException The index passed was outside the range of 0 through System.Data.IDataRecord.FieldCount.

GetFloat(int)​

Gets the single-precision floating point number of the specified field.

Declaration
public float GetFloat(int i)
Returns​

System.Single

The single-precision floating point number of the specified field.

Parameters​
TypeNameDescription
System.Int32iThe index of the field to find.
Exceptions​

System.IndexOutOfRangeException The index passed was outside the range of 0 through System.Data.IDataRecord.FieldCount.

GetGuid(int)​

Returns the GUID value of the specified field.

Declaration
public Guid GetGuid(int i)
Returns​

System.Guid

The GUID value of the specified field.

Parameters​
TypeNameDescription
System.Int32iThe index of the field to find.
Exceptions​

System.IndexOutOfRangeException The index passed was outside the range of 0 through System.Data.IDataRecord.FieldCount.

GetInt16(int)​

Gets the 16-bit signed integer value of the specified field.

Declaration
public short GetInt16(int i)
Returns​

System.Int16

The 16-bit signed integer value of the specified field.

Parameters​
TypeNameDescription
System.Int32iThe index of the field to find.
Exceptions​

System.IndexOutOfRangeException The index passed was outside the range of 0 through System.Data.IDataRecord.FieldCount.

GetInt32(int)​

Gets the 32-bit signed integer value of the specified field.

Declaration
public int GetInt32(int i)
Returns​

System.Int32

The 32-bit signed integer value of the specified field.

Parameters​
TypeNameDescription
System.Int32iThe index of the field to find.
Exceptions​

System.IndexOutOfRangeException The index passed was outside the range of 0 through System.Data.IDataRecord.FieldCount.

GetInt64(int)​

Gets the 64-bit signed integer value of the specified field.

Declaration
public long GetInt64(int i)
Returns​

System.Int64

The 64-bit signed integer value of the specified field.

Parameters​
TypeNameDescription
System.Int32iThe index of the field to find.
Exceptions​

System.IndexOutOfRangeException The index passed was outside the range of 0 through System.Data.IDataRecord.FieldCount.

GetValues(object[])​

Populates an array of objects with the column values of the current record.

Declaration
public int GetValues(object[] values)
Returns​

System.Int32

The number of instances of System.Object in the array.

Parameters​
TypeNameDescription
System.Object[]valuesAn array of System.Object to copy the attribute fields into.

GetString(int)​

Gets the string value of the specified field.

Declaration
public string GetString(int i)
Returns​

System.String

The string value of the specified field.

Parameters​
TypeNameDescription
System.Int32iThe index of the field to find.
Exceptions​

System.IndexOutOfRangeException The index passed was outside the range of 0 through System.Data.IDataRecord.FieldCount.

GetSchemaTable()​

Returns a System.Data.DataTable that describes the column metadata of the System.Data.IDataReader.

Returns null if the executed command returned no resultset, or after System.Data.IDataReader.NextResult returns false.

Declaration
public DataTable GetSchemaTable()
Returns​

System.Data.DataTable

A System.Data.DataTable that describes the column metadata.

Exceptions​

System.InvalidOperationException The System.Data.IDataReader is closed.

NextResult()​

Advances the data reader to the next result, when reading the results of batch SQL statements.

Declaration
public bool NextResult()
Returns​

System.Boolean

true if there are more rows; otherwise, false.

Close()​

Closes the System.Data.IDataReader Object.

Declaration
public void Close()

Dispose()​

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Declaration
public void Dispose()

Implements​

  • System.Data.IDataReader
  • System.Data.IDataRecord
  • System.IDisposable

Inherited Members​

  • System.Object.Equals(System.Object)
  • System.Object.Equals(System.Object,System.Object)
  • System.Object.GetHashCode
  • System.Object.GetType
  • System.Object.MemberwiseClone
  • System.Object.ReferenceEquals(System.Object,System.Object)
  • System.Object.ToString

Was this page helpful?