PartitionWriter¶
-
class
vertica_sdk.
PartitionWriter
¶ Iterator-based write interface for producing output from a single partition. Automatically makes space a block at a time, as needed.
-
copyColumn
(self, dstcol, srcblock, srccol)¶ Copy a column from the current row of srcblock into the current row of this block.
Returns
None
.
-
copyRow
(self, srcblock)¶ Copy a row from the current row of srcblock into the current row of this block.
Returns
None
.
-
findUnsetColumn
(self)¶
-
getArrayWriter
(self, col)¶ Returns a
vertica_sdk.ArrayWriter
object used to write array data to the indicated zero-indexed column of the current row.
-
getNumCols
(self)¶ Returns the number of columns held by this writer.
-
getRowWriter
(self, col)¶ Returns a
vertica_sdk.RowWriter
objects used to write row data to the indicated zero-indexed field of this row.
-
getTypeMetaData
(self)¶ Returns a
vertica_sdk.SizedColumnTypes
object describing the column types of this writer.
-
getTypeMetadata
(self)¶
-
next
(self)¶ Advance to the next row. If space is needed, it will be transparently allocated.
Returns True if there is space available to write more rows. Returns False otherwise.
-
setArray
(self, col, value)¶ Write a
list
object into the the indicated zero-indexed column of the current row.Returns
None
.
-
setBinary
(self, col, value)¶ Write a
bytes
object into the indicated zero-indexed column of the current row.Returns
None
.
-
setBool
(self, col, value)¶ Write a boolean value into the indicated zero-indexed column of the current row.
Returns
None
.
-
setDate
(self, col, value)¶ Write a
datetime.datetime
ordatetime.date
object into the indicated zero-indexed column of the current row.Returns
None
.
-
setFloat
(self, col, value)¶ Write a
float
value into the indicated zero-indexed column of the current row.Returns
None
.
-
setHook
(self, col)¶
-
setInt
(self, col, value)¶ Write an
int
value into the indicated zero-indexed column of the current row.Returns
None
.
-
setInterval
(self, col, value)¶ Write a
datetime.timedelta
object into the indicated zero-indexed column of the current row.Returns
None
.
-
setIntervalYM
(self, col, value)¶ Write a
datetime.timedelta
object into the indicated zero-indexed column of the current row.Returns
None
.
-
setNull
(self, col)¶ Set the indicated zero-indexed column of the current row to NULL.
Returns
None
.
-
setNumeric
(self, col, value)¶ Write a
decimal.Decimal
object into the indicated zero-indexed column of the current row.Returns
None
.
-
setRow
(self, col, value)¶ Write row data into the indicated zero-indexed column of the current row. Supported input value formats are: -
tuple
, where each entry corresponds to a field in its corresponding field order -dict
orcollections.OrderedDict
, where each key-value pair maps field name to field valueReturns
None
.
-
setString
(self, col, value)¶ Write a
str
object into the indicated zero-indexed column of the current row.Returns
None
.
-
setTime
(self, col, value)¶ Write a
datetime.time
object (withdatetime.tzinfo
) into the indicated zero-indexed column of the current row.Returns
None
.
-
setTimeTz
(self, col, value)¶ Write a
datetime.time
object into the indicated zero-indexed column of the current row.Returns
None
.
-
setTimestamp
(self, col, value)¶ Write a
datetime.datetime
object with appropriate time-zone awareness into the indicated zero-indexed column of the current row.Returns
None
.
-
setTimestampTz
(self, col, value)¶ Alias for setTimestamp().
-