PartitionReader

class vertica_sdk.PartitionReader

Iterator-based read interface over all input data in a single partition. Automatically fetches data from Vertica as needed.

getArray(self, idx)

Returns a list containing this reader’s array data. Nested complex types are also expanded in the result: rows into OrderedDicts, and arrays into lists.

getArrayHelper(self, idx)
getArrayReader(self, idx)

Returns a vertica_sdk.ArrayReader object used to access this reader’s array data.

getBinary(self, idx)

Returns a bytes object.

getBool(self, idx)

Returns a int (SQL null means this has more than two values).

getDate(self, idx)

Returns a datetime.date.

getFloat(self, idx)

Returns a float.

getInt(self, idx)

Returns an int.

getInterval(self, idx)

Returns a datetime.timedelta.

The return value can be a negative interval. Use abs(val) to see the absolute value.

getIntervalYM(self, idx)

Returns an int that represents an interval in months.

The return value can be a negative interval.

getNumCols(self)

Returns the number of columns held by this reader.

getNumRows(self)

Returns the number of rows held by this reader.

getNumeric(self, idx)

Returns a decimal.Decimal.

getRow(self, idx)

Returns a collections.OrderedDict containing this reader’s row data. Nested complex types are also expanded in the result: rows into OrderedDicts, and arrays into lists.

getRowReader(self, idx)

Returns a vertica_sdk.RowReader object used to access the row fields of this reader.

getString(self, idx)

Returns a str (unicode code point values).

getTime(self, idx)

Returns a datetime.time.

getTimeTz(self, idx)

Returns a datetime.time with datetime.tzinfo set to constant offset.

getTimestamp(self, idx)

Returns a datetime.datetime.

getTimestampTz(self, idx)

Returns a datetime.datetime.

TimestampTz objects contain no timezone information in the Vertica SDK. All times are UTC.

getTypeMetaData(self)

Returns a vertica_sdk.SizedColumnTypes object describing the column types of this reader.

getTypeMetadata(self)

Returns a vertica_sdk.SizedColumnTypes object describing the column types of this reader.

hasData(self)

Returns True if this reader has rows remaining after the current one, or False otherwise.

hasMoreData(self)

Returns True if there are more rows avaiable to read, and False otherwise.

isNull(self, col)

Returns True if the value in the indicated zero-indexed column of the current row is NULL, and False otherwise.

next(self)

Advance to the next row. If more input is needed, it will be transparently allocated.

Returns True if there is more input available, and False otherwise.