This is the multi-page printable view of this section.
Click here to print.
Return to the regular view of this page.
Python SDK
Welcome to the Vertica Python SDK Documentation. This documentation covers
all of the classes that make up the Python SDK API. Using this API, you can
create User Defined Extensions (UDxs) that integrate your own features into the
Vertica Analytics Platform.
See Developing User-Defined Extensions.
The Vertica Python SDK requires Python 3.
Python UDx SDK Documentation
1 - BlockReader
class vertica_sdk.BlockReader
Interface for reading a list of in-memory tuples.
All rows have the same column types.
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.
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)
Advances the block reader to the next row of input. Returns True if more input
rows are available, and False otherwise.
2 - BlockWriter
class vertica_sdk.BlockWriter
Interface for writing a list of in-memory tuples.
All rows have the same column types.
copyColumn(self, srcblock, srccol)
Copy a column from the current row of srcblock into the current row of this block.
Returns None.
getArrayWriter(self)
Returns a vertica_sdk.ArrayWriter object used to store array data.
getNumCols(self)
Returns the number of columns held by this writer.
getNumRows(self)
Returns the number of rows held by this writer.
getRowWriter(self)
Returns a vertica_sdk.RowWriter objects used to store row data.
getTypeMetadata(self)
Returns a vertica_sdk.SizedColumnTypes object describing the column types of this writer.
next(self)
Advances the block writer to the next row of output.
Returns None.
setArray(self, value)
Stores a list object as array data.
Returns None.
setBinary(self, value)
Stores a binary value for the current row.
Raises a RuntimeError when this block data type does not match.
Returns None.
setBool(self, value)
Stores a bool value for the current row.
Raises a RuntimeError when this block data type does not match.
Returns None.
setDate(self, value)
Stores a datetime.datetime or datetime.date.
Raises a RuntimeError when this block data type does not match.
Returns None.
setFloat(self, value)
Stores a float value for the current row.
Raises a RuntimeError when this block data type does not match.
Returns None.
setHook(self)
setInt(self, value)
Stores an int value for the current row.
Raises a RuntimeError when this block data type does not match.
Returns None.
setInterval(self, value)
Stores a datetime.timedelta.
Raises a RuntimeError when this block data type does not match.
Returns None.
setIntervalYM(self, value)
Stores an int number of months.
Raises a RuntimeError when this block data type does not match.
Returns None.
setNull(self)
Sets the output for the current row to NULL.
Returns None.
setNumeric(self, value)
Stores a decimal.Decimal. Values will be rounded to the scale of the output type.
Raises a RuntimeError when this block data type does not match.
Returns None.
setRow(self, value)
Stores row data. Supported input value formats are:
- tuple, where each entry corresponds to a field in its corresponding field order
- dict or collections.OrderedDict, where each key-value pair maps field name to field value
Returns None.
setString(self, value)
Stores a string value for the current row.
Raises a RuntimeError when this block data type does not match.
Returns None.
setTime(self, value)
Stores a datetime.time.
Raises a RuntimeError when this block data type does not match.
Returns None.
setTimeTz(self, value)
Stores a datetime.time with datetime.tzinfo.
Raises a RuntimeError when this block data type does not match.
Returns None.
setTimestamp(self, value)
Stores a datetime.datetime with appropriate time-zone awareness.
Raises a RuntimeError when this block data type does not match.
Returns None.
setTimestampTz(self, value)
Stores a datetime.datetime with appropriate time-zone awareness.
Raises a RuntimeError when this block data type does not match.
Returns None.
3 - ColumnTypes
class vertica_sdk.ColumnTypes
Stores type metadata for a collection of columns.
addAny(self)
Specifies that a variable number of columns can be accepted.
Returns None.
addArrayType(self, elementPrototype)
Adds an array type to the list of columns, with the same element type as the provided
vertica_sdk.ColumnTypes. Requires that the element type contain exactly one column.
Returns None.
addBinary(self)
Adds a binary column to the list of columns.
Returns None.
addBool(self)
Adds a bool column to the list of columns.
Returns None.
addChar(self)
Adds a char column to the list of columns.
Returns None.
addDate(self)
Adds a date column to the list of columns.
Returns None.
addFloat(self)
Adds a float column to the list of columns.
Returns None.
addInt(self)
Adds an int column to the list of columns.
Returns None.
addInterval(self)
Adds a interval column to the list of columns.
Returns None.
addIntervalYM(self)
Adds a year-to-month interval column to the list of columns.
Returns None.
addLongVarbinary(self)
Adds a long varbinary column to the list of columns.
Returns None.
addLongVarchar(self)
Adds a long varchar column to the list of columns.
Returns None.
addNumeric(self)
Adds a numeric column to the list of columns.
Returns None.
addRowType(self, fieldsPrototpye)
Adds a row type to the list of columns, with the same fields as the provided vertica_sdk.ColumnTypes.
Returns None.
addTime(self)
Adds a time column to the list of columns.
Returns None.
addTimeTz(self)
Adds a timetz column to the list of columns.
Returns None.
addTimestamp(self)
Adds a timestamp column to the list of columns.
Returns None.
addTimestampTz(self)
Adds a timestamptz column to the list of columns.
Returns None.
addVarbinary(self)
Adds a varbinary column to the list of columns.
Returns None.
addVarchar(self)
Adds a varchar column to the list of columns.
Returns None.
getColumnCount(self)
Returns the number of columns.
getColumnType(self, idx)
Returns the OID of the type of the indicated column.
static makeAny()
Returns a vertica_sdk.ColumnTypes that accepts a variable number of column types.
static makeArrayType(elementPrototype)
Returns a vertica_sdk.ColumnTypes with one array column, with its element
type specified by the provided vertica_sdk.ColumnTypes argument.
static makeBinary()
Returns a vertica_sdk.ColumnTypes with one binary column.
static makeBool()
Returns a vertica_sdk.ColumnTypes with one bool column.
static makeChar()
Returns a vertica_sdk.ColumnTypes with one char column.
static makeDate()
Returns a vertica_sdk.ColumnTypes with one date column.
static makeEmpty()
Returns an emtpy vertica_sdk.ColumnTypes.
static makeFloat()
Returns a vertica_sdk.ColumnTypes with one float column.
static makeInt()
Returns a vertica_sdk.ColumnTypes with one int column.
static makeInterval()
Returns a vertica_sdk.ColumnTypes with one interval column.
static makeIntervalYM()
Returns a vertica_sdk.ColumnTypes with one year-to-month interval column.
static makeLongVarbinary()
Returns a vertica_sdk.ColumnTypes with one long varbinary column.
static makeLongVarchar()
Returns a vertica_sdk.ColumnTypes with one long varchar column.
static makeNumeric()
Returns a vertica_sdk.ColumnTypes with one numeric column.
static makeRowType(fieldsPrototype)
Returns a vertica_sdk.ColumnTypes with one row column, with field types
specified by the provided vertica_sdk.ColumnTypes argument.
static makeTime()
Returns a vertica_sdk.ColumnTypes with one time column.
static makeTimeTz()
Returns a vertica_sdk.ColumnTypes with one timetz column.
static makeTimestamp()
Returns a vertica_sdk.ColumnTypes with one timestamp column.
static makeTimestampTz()
Returns a vertica_sdk.ColumnTypes with one timestamptz column.
static makeVarbinary()
Returns a vertica_sdk.ColumnTypes with one varbinary column.
static makeVarchar()
Returns a vertica_sdk.ColumnTypes with one varchar column.
4 - FilterFactory
class vertica_sdk.FilterFactory
Produces vertica_sdk.UDFilter objects, which transform one raw data stream into another.
vertica_sdk.FilterFactory implementations should be stateless.
Modifications to instance, class, or global variables might not be persisted.
classmethod getUDXFactoryType(cls)
Returns vertica_sdk.UDXType.LOAD_FILTER.
classmethod plan(self, serverInterface, planContext)
Execute any logic required at query plan time.
This method is run once per query on the initiator node.
If it raises an exception, the query will not proceed.
serverInterface is a vertica_sdk.ServerInterface object which provides
access to server functionality, including session and statement parameters.
planContext is vertica_sdk.PlanContext object, for storing and retrieving data
which will be serialized and distributed to all nodes which
run the query plan.
classmethod prepare(self, serverInterface, planContext)
Create a vertica_sdk.UDFilter object for execution.
This method is run once per load thread on each node,
prior to the start of execution.
serverInterface is a vertica_sdk.ServerInterface object which provides
access to server functionality, including session and statement parameters.
It contains the same parameters as the ServerInterface argument to
plan() in the same query.
planContext is a vertica_sdk.PlanContext object which
contains any data which was stored during a call to plan().
5 - Index
A
| B
| C
| D
| E
| F
| G
| H
| I
| K
| L
| M
| N
| O
| P
| R
| S
| T
| U
| V
| W
A
| addAny() (vertica_sdk.ColumnTypes method) addArrayType() (vertica_sdk.ColumnTypes method) (vertica_sdk.SizedColumnTypes method) addBinary() (vertica_sdk.ColumnTypes method) (vertica_sdk.SizedColumnTypes method) addBinaryOrderColumn() (vertica_sdk.SizedColumnTypes method) addBinaryPartitionColumn() (vertica_sdk.SizedColumnTypes method) addBool() (vertica_sdk.ColumnTypes method) (vertica_sdk.SizedColumnTypes method) addBoolOrderColumn() (vertica_sdk.SizedColumnTypes method) addBoolPartitionColumn() (vertica_sdk.SizedColumnTypes method) addChar() (vertica_sdk.ColumnTypes method) (vertica_sdk.SizedColumnTypes method) addCharOrderColumn() (vertica_sdk.SizedColumnTypes method) addCharPartitionColumn() (vertica_sdk.SizedColumnTypes method) addColumn() (vertica_sdk.SizedColumnTypes method) addDate() (vertica_sdk.ColumnTypes method) (vertica_sdk.SizedColumnTypes method) addDateOrderColumn() (vertica_sdk.SizedColumnTypes method) addDatePartitionColumn() (vertica_sdk.SizedColumnTypes method) addFloat() (vertica_sdk.ColumnTypes method) (vertica_sdk.SizedColumnTypes method) addFloatOrderColumn() (vertica_sdk.SizedColumnTypes method) addFloatPartitionColumn() (vertica_sdk.SizedColumnTypes method) addInt() (vertica_sdk.ColumnTypes method) (vertica_sdk.SizedColumnTypes method) addInterval() (vertica_sdk.ColumnTypes method) (vertica_sdk.SizedColumnTypes method) addIntervalOrderColumn() (vertica_sdk.SizedColumnTypes method) addIntervalPartitionColumn() (vertica_sdk.SizedColumnTypes method) addIntervalYM() (vertica_sdk.ColumnTypes method) (vertica_sdk.SizedColumnTypes method) addIntervalYMOrderColumn() (vertica_sdk.SizedColumnTypes method) addIntervalYMPartitionColumn() (vertica_sdk.SizedColumnTypes method) addIntOrderColumn() (vertica_sdk.SizedColumnTypes method) addIntPartitionColumn() (vertica_sdk.SizedColumnTypes method) addLongVarbinary() (vertica_sdk.ColumnTypes method) (vertica_sdk.SizedColumnTypes method) addLongVarbinaryOrderColumn() (vertica_sdk.SizedColumnTypes method) addLongVarbinaryPartitionColumn() (vertica_sdk.SizedColumnTypes method) addLongVarchar() (vertica_sdk.ColumnTypes method) (vertica_sdk.SizedColumnTypes method) |
addLongVarcharOrderColumn() (vertica_sdk.SizedColumnTypes method) addLongVarcharPartitionColumn() (vertica_sdk.SizedColumnTypes method) addNumeric() (vertica_sdk.ColumnTypes method) (vertica_sdk.SizedColumnTypes method) addNumericOrderColumn() (vertica_sdk.SizedColumnTypes method) addNumericPartitionColumn() (vertica_sdk.SizedColumnTypes method) addOrderColumn() (vertica_sdk.SizedColumnTypes method) addPartitionColumn() (vertica_sdk.SizedColumnTypes method) addRowType() (vertica_sdk.ColumnTypes method) (vertica_sdk.SizedColumnTypes method) addTime() (vertica_sdk.ColumnTypes method) (vertica_sdk.SizedColumnTypes method) addTimeOrderColumn() (vertica_sdk.SizedColumnTypes method) addTimePartitionColumn() (vertica_sdk.SizedColumnTypes method) addTimestamp() (vertica_sdk.ColumnTypes method) (vertica_sdk.SizedColumnTypes method) addTimestampOrderColumn() (vertica_sdk.SizedColumnTypes method) addTimestampPartitionColumn() (vertica_sdk.SizedColumnTypes method) addTimestampTz() (vertica_sdk.ColumnTypes method) (vertica_sdk.SizedColumnTypes method) addTimestampTzOrderColumn() (vertica_sdk.SizedColumnTypes method) addTimestampTzPartitionColumn() (vertica_sdk.SizedColumnTypes method) addTimeTz() (vertica_sdk.ColumnTypes method) (vertica_sdk.SizedColumnTypes method) addTimeTzOrderColumn() (vertica_sdk.SizedColumnTypes method) addTimeTzPartitionColumn() (vertica_sdk.SizedColumnTypes method) addUuid() (vertica_sdk.SizedColumnTypes method) addUuidOrderColumn() (vertica_sdk.SizedColumnTypes method) addVarbinary() (vertica_sdk.ColumnTypes method) (vertica_sdk.SizedColumnTypes method) addVarbinaryOrderColumn() (vertica_sdk.SizedColumnTypes method) addVarbinaryPartitionColumn() (vertica_sdk.SizedColumnTypes method) addVarchar() (vertica_sdk.ColumnTypes method) (vertica_sdk.SizedColumnTypes method) addVarcharOrderColumn() (vertica_sdk.SizedColumnTypes method) addVarcharPartitionColumn() (vertica_sdk.SizedColumnTypes method) advance() (vertica_sdk.InputBuffer method) AGGREGATE (vertica_sdk.UDXType attribute) ANALYTIC (vertica_sdk.UDXType attribute) |
B
| BlockReader (class in vertica_sdk) |
BlockWriter (class in vertica_sdk) |
C
| canApportionParser() (vertica_sdk.ParserFactory class method) CHUNK_ALIGNED (vertica_sdk.StreamState attribute) ColumnTypes (class in vertica_sdk) containsColumns() (vertica_sdk.PerColumnParamReader method) containsNamespace() (vertica_sdk.SessionParamWriterMap method) containsParameter() (vertica_sdk.ParamReader method) (vertica_sdk.ParamWriter method) |
copyColumn() (vertica_sdk.BlockWriter method) (vertica_sdk.PartitionWriter method) copyRow() (vertica_sdk.PartitionWriter method) copyTypesFrom() (vertica_sdk.SizedColumnTypes method) createScalarFunction() (vertica_sdk.ScalarFunctionFactory class method) createTransformFunction() (vertica_sdk.TransformFunctionFactory class method) (vertica_sdk.TransformFunctionPhase class method) |
D
| destroy (vertica_sdk.ScalarFunction attribute) (vertica_sdk.UDFilter attribute) (vertica_sdk.UDParser attribute) (vertica_sdk.UDXObject attribute) |
DONE (vertica_sdk.StreamState attribute) |
E
| END_OF_FILE (vertica_sdk.InputState attribute) |
F
| FILESYSTEM (vertica_sdk.UDXType attribute) FilterFactory (class in vertica_sdk) |
findUnsetColumn() (vertica_sdk.PartitionWriter method) (vertica_sdk.StreamWriter method) |
G
| getArgumentColumns() (vertica_sdk.SizedColumnTypes method) getArray() (vertica_sdk.BlockReader method) (vertica_sdk.PartitionReader method) getArrayBound() (vertica_sdk.VerticaType method) getArrayHelper() (vertica_sdk.BlockReader method) (vertica_sdk.PartitionReader method) getArrayReader() (vertica_sdk.BlockReader method) (vertica_sdk.PartitionReader method) getArrayWriter() (vertica_sdk.BlockWriter method) (vertica_sdk.PartitionWriter method) (vertica_sdk.StreamWriter method) getBinary() (vertica_sdk.BlockReader method) (vertica_sdk.PartitionReader method) getBool() (vertica_sdk.BlockReader method) (vertica_sdk.ParamReader method) (vertica_sdk.ParamWriter method) (vertica_sdk.PartitionReader method) getClusterNodes() (vertica_sdk.PlanContext method) getColumnCount() (vertica_sdk.ColumnTypes method) (vertica_sdk.SizedColumnTypes method) getColumnName() (vertica_sdk.SizedColumnTypes method) getColumnNames() (vertica_sdk.PerColumnParamReader method) getColumnParamReader() (vertica_sdk.PerColumnParamReader method) getColumnType() (vertica_sdk.ColumnTypes method) (vertica_sdk.SizedColumnTypes method) getData (vertica_sdk.RejectedRecord attribute) getDatabaseName() (vertica_sdk.ServerInterface method) getDate() (vertica_sdk.BlockReader method) (vertica_sdk.ParamReader method) (vertica_sdk.ParamWriter method) (vertica_sdk.PartitionReader method) getElementType() (vertica_sdk.VerticaType method) getFieldName() (vertica_sdk.VerticaType method) getFieldType() (vertica_sdk.VerticaType method) getFloat() (vertica_sdk.BlockReader method) (vertica_sdk.ParamReader method) (vertica_sdk.ParamWriter method) (vertica_sdk.PartitionReader method) getInt() (vertica_sdk.BlockReader method) (vertica_sdk.ParamReader method) (vertica_sdk.ParamWriter method) (vertica_sdk.PartitionReader method) getInterval() (vertica_sdk.BlockReader method) (vertica_sdk.ParamReader method) (vertica_sdk.ParamWriter method) (vertica_sdk.PartitionReader method) getIntervalPrecision() (vertica_sdk.VerticaType method) getIntervalRange() (vertica_sdk.VerticaType method) getIntervalYM() (vertica_sdk.BlockReader method) (vertica_sdk.ParamReader method) (vertica_sdk.ParamWriter method) (vertica_sdk.PartitionReader method) getLastOrderColumnIdx() (vertica_sdk.SizedColumnTypes method) getLastPartitionColumnIdx() (vertica_sdk.SizedColumnTypes method) getLocale() (vertica_sdk.ServerInterface method) getMaxSize() (vertica_sdk.VerticaType method) getNamespaces() (vertica_sdk.SessionParamWriterMap method) getNodeName() (vertica_sdk.ServerInterface method) getNumCols() (vertica_sdk.BlockReader method) (vertica_sdk.BlockWriter method) (vertica_sdk.PartitionReader method) (vertica_sdk.PartitionWriter method) (vertica_sdk.StreamWriter method) getNumeric() (vertica_sdk.BlockReader method) (vertica_sdk.ParamReader method) (vertica_sdk.ParamWriter method) (vertica_sdk.PartitionReader method) getNumericFractional() (vertica_sdk.VerticaType method) getNumericIntegral() (vertica_sdk.VerticaType method) getNumericPrecision() (vertica_sdk.VerticaType method) getNumericScale() (vertica_sdk.VerticaType method) getNumericWordCount() (vertica_sdk.VerticaType method) getNumFields() (vertica_sdk.VerticaType method) getNumRows() (vertica_sdk.BlockReader method) (vertica_sdk.BlockWriter method) (vertica_sdk.PartitionReader method) getOffset() (vertica_sdk.InputBuffer method) |
getOrderByColumns() (vertica_sdk.SizedColumnTypes method) getParameterType (vertica_sdk.UDXFactory attribute) getParamNames() (vertica_sdk.ParamReader method) (vertica_sdk.ParamWriter method) getParamReader() (vertica_sdk.ServerInterface method) getParserReturnType() (vertica_sdk.ParserFactory class method) getPartitionByColumns() (vertica_sdk.SizedColumnTypes method) getPerInstanceResources (vertica_sdk.UDXFactory attribute) getPhases() (vertica_sdk.MultiPhaseTransformFunctionFactory class method) getPrettyPrintStr() (vertica_sdk.VerticaType method) getPrototype (vertica_sdk.MultiPhaseTransformFunctionFactory attribute) (vertica_sdk.UDXFactory attribute) getReader() (vertica_sdk.PlanContext method) getReason (vertica_sdk.RejectedRecord attribute) getReturnType (vertica_sdk.MultiPhaseTransformFunctionFactory attribute) (vertica_sdk.TransformFunctionPhase attribute) (vertica_sdk.UDXFactory attribute) getRow() (vertica_sdk.BlockReader method) (vertica_sdk.PartitionReader method) getRowReader() (vertica_sdk.BlockReader method) (vertica_sdk.PartitionReader method) getRowWriter() (vertica_sdk.BlockWriter method) (vertica_sdk.PartitionWriter method) (vertica_sdk.StreamWriter method) getSize() (vertica_sdk.InputBuffer method) getString() (vertica_sdk.BlockReader method) (vertica_sdk.ParamReader method) (vertica_sdk.ParamWriter method) (vertica_sdk.PartitionReader method) getStringLength() (vertica_sdk.VerticaType method) getTerminator (vertica_sdk.RejectedRecord attribute) getTime() (vertica_sdk.BlockReader method) (vertica_sdk.ParamReader method) (vertica_sdk.ParamWriter method) (vertica_sdk.PartitionReader method) getTimePrecision() (vertica_sdk.VerticaType method) getTimestamp() (vertica_sdk.BlockReader method) (vertica_sdk.ParamReader method) (vertica_sdk.ParamWriter method) (vertica_sdk.PartitionReader method) getTimestampPrecision() (vertica_sdk.VerticaType method) getTimestampTz() (vertica_sdk.BlockReader method) (vertica_sdk.ParamReader method) (vertica_sdk.ParamWriter method) (vertica_sdk.PartitionReader method) getTimeTz() (vertica_sdk.BlockReader method) (vertica_sdk.ParamReader method) (vertica_sdk.ParamWriter method) (vertica_sdk.PartitionReader method) getTotalRowCount() (vertica_sdk.StreamWriter method) getTypeMetaData() (vertica_sdk.BlockReader method) getTypeMetadata() (vertica_sdk.BlockReader method) (vertica_sdk.BlockWriter method) getTypeMetaData() (vertica_sdk.PartitionReader method) getTypeMetadata() (vertica_sdk.PartitionReader method) getTypeMetaData() (vertica_sdk.PartitionWriter method) getTypeMetadata() (vertica_sdk.PartitionWriter method) (vertica_sdk.StreamWriter method) getTypeMod() (vertica_sdk.VerticaType method) getTypeOid() (vertica_sdk.VerticaType method) getTypeStr() (vertica_sdk.VerticaType method) getUDSessionParamReader() (vertica_sdk.ServerInterface method) getUDSessionParamWriter() (vertica_sdk.SessionParamWriterMap method) getUDXFactoryType() (vertica_sdk.FilterFactory class method) (vertica_sdk.MultiPhaseTransformFunctionFactory class method) (vertica_sdk.ParserFactory class method) (vertica_sdk.ScalarFunctionFactory class method) (vertica_sdk.TransformFunctionFactory class method) (vertica_sdk.UDXFactory class method) getUserName() (vertica_sdk.ServerInterface method) getWriter() (vertica_sdk.PlanContext method) |
H
| hasData() (vertica_sdk.BlockReader method) (vertica_sdk.PartitionReader method) |
hasMoreData() (vertica_sdk.PartitionReader method) |
I
| INPUT_NEEDED (vertica_sdk.StreamState attribute) InputBuffer (class in vertica_sdk) InputState (class in vertica_sdk) INVALID_UDX (vertica_sdk.UDXType attribute) isArrayType() (vertica_sdk.VerticaType method) isBinary() (vertica_sdk.VerticaType method) isBool() (vertica_sdk.VerticaType method) isChar() (vertica_sdk.VerticaType method) isComplexArrayType() (vertica_sdk.VerticaType method) isComplexRowType() (vertica_sdk.VerticaType method) isDate() (vertica_sdk.VerticaType method) isEmpty() (vertica_sdk.ParamReader method) (vertica_sdk.ParamWriter method) isFloat() (vertica_sdk.VerticaType method) isInt() (vertica_sdk.VerticaType method) isInterval() (vertica_sdk.VerticaType method) isIntervalYM() (vertica_sdk.VerticaType method) |
isLongVarbinary() (vertica_sdk.VerticaType method) isLongVarchar() (vertica_sdk.VerticaType method) isNull() (vertica_sdk.BlockReader method) (vertica_sdk.PartitionReader method) isNumeric() (vertica_sdk.VerticaType method) isOrderByColumn() (vertica_sdk.SizedColumnTypes method) isPartitionByColumn() (vertica_sdk.SizedColumnTypes method) isPrepass (vertica_sdk.TransformFunctionPhase attribute) isStringType() (vertica_sdk.VerticaType method) isTime() (vertica_sdk.VerticaType method) isTimestamp() (vertica_sdk.VerticaType method) isTimestampTz() (vertica_sdk.VerticaType method) isTimeTz() (vertica_sdk.VerticaType method) isUUID() (vertica_sdk.VerticaType method) isVarbinary() (vertica_sdk.VerticaType method) isVarchar() (vertica_sdk.VerticaType method) |
K
| KEEP_GOING (vertica_sdk.StreamState attribute) |
KEYMANAGER (vertica_sdk.UDXType attribute) |
L
| LOAD_FILTER (vertica_sdk.UDXType attribute) LOAD_PARSER (vertica_sdk.UDXType attribute) |
LOAD_SOURCE (vertica_sdk.UDXType attribute) log() (vertica_sdk.ServerInterface method) |
M
| makeAny() (vertica_sdk.ColumnTypes static method) makeArrayType() (vertica_sdk.ColumnTypes static method) (vertica_sdk.SizedColumnTypes static method) makeBinary() (vertica_sdk.ColumnTypes static method) (vertica_sdk.SizedColumnTypes static method) makeBool() (vertica_sdk.ColumnTypes static method) (vertica_sdk.SizedColumnTypes static method) makeChar() (vertica_sdk.ColumnTypes static method) (vertica_sdk.SizedColumnTypes static method) makeDate() (vertica_sdk.ColumnTypes static method) (vertica_sdk.SizedColumnTypes static method) makeEmpty() (vertica_sdk.ColumnTypes static method) (vertica_sdk.SizedColumnTypes static method) makeFloat() (vertica_sdk.ColumnTypes static method) (vertica_sdk.SizedColumnTypes static method) makeInt() (vertica_sdk.ColumnTypes static method) (vertica_sdk.SizedColumnTypes static method) makeInterval() (vertica_sdk.ColumnTypes static method) (vertica_sdk.SizedColumnTypes static method) makeIntervalYM() (vertica_sdk.ColumnTypes static method) (vertica_sdk.SizedColumnTypes static method) makeLongVarbinary() (vertica_sdk.ColumnTypes static method) (vertica_sdk.SizedColumnTypes static method) |
makeLongVarchar() (vertica_sdk.ColumnTypes static method) (vertica_sdk.SizedColumnTypes static method) makeNumeric() (vertica_sdk.ColumnTypes static method) (vertica_sdk.SizedColumnTypes static method) makeRowType() (vertica_sdk.ColumnTypes static method) (vertica_sdk.SizedColumnTypes static method) makeTime() (vertica_sdk.ColumnTypes static method) (vertica_sdk.SizedColumnTypes static method) makeTimestamp() (vertica_sdk.ColumnTypes static method) (vertica_sdk.SizedColumnTypes static method) makeTimestampTz() (vertica_sdk.ColumnTypes static method) (vertica_sdk.SizedColumnTypes static method) makeTimeTz() (vertica_sdk.ColumnTypes static method) (vertica_sdk.SizedColumnTypes static method) makeUuid() (vertica_sdk.SizedColumnTypes static method) makeVarbinary() (vertica_sdk.ColumnTypes static method) (vertica_sdk.SizedColumnTypes static method) makeVarchar() (vertica_sdk.ColumnTypes static method) (vertica_sdk.SizedColumnTypes static method) MULTI_TRANSFORM (vertica_sdk.UDXType attribute) MultiPhaseTransformFunctionFactory (class in vertica_sdk) |
N
| next() (vertica_sdk.BlockReader method) (vertica_sdk.BlockWriter method) (vertica_sdk.PartitionReader method) (vertica_sdk.PartitionWriter method) (vertica_sdk.StreamWriter method) |
O
| OK (vertica_sdk.InputState attribute) OUTPUT_NEEDED (vertica_sdk.StreamState attribute) |
OutputBuffer (class in vertica_sdk) |
P
| ParamReader (class in vertica_sdk) ParamWriter (class in vertica_sdk) ParserFactory (class in vertica_sdk) PartitionReader (class in vertica_sdk) PartitionWriter (class in vertica_sdk) peek() (vertica_sdk.InputBuffer method) PerColumnParamReader (class in vertica_sdk) |
plan() (vertica_sdk.FilterFactory class method) (vertica_sdk.ParserFactory class method) PlanContext (class in vertica_sdk) prepare() (vertica_sdk.FilterFactory class method) (vertica_sdk.ParserFactory class method) process (vertica_sdk.UDFilter attribute) (vertica_sdk.UDParser attribute) processBlock (vertica_sdk.ScalarFunction attribute) processPartition (vertica_sdk.TransformFunction attribute) |
R
| read() (vertica_sdk.InputBuffer method) REJECT() (vertica_sdk.StreamState method) RejectedRecord (class in vertica_sdk) reportError() (vertica_sdk.ServerInterface method) |
reportInfo() (vertica_sdk.ServerInterface method) reportNotice() (vertica_sdk.ServerInterface method) reportWarning() (vertica_sdk.ServerInterface method) reset() (vertica_sdk.SizedColumnTypes method) |
S
| SCALAR (vertica_sdk.UDXType attribute) ScalarFunction (class in vertica_sdk) ScalarFunctionFactory (class in vertica_sdk) ServerInterface (class in vertica_sdk) SessionParamWriterMap (class in vertica_sdk) setArray() (vertica_sdk.BlockWriter method) (vertica_sdk.PartitionWriter method) (vertica_sdk.StreamWriter method) setBinary() (vertica_sdk.BlockWriter method) (vertica_sdk.PartitionWriter method) (vertica_sdk.StreamWriter method) setBool() (vertica_sdk.BlockWriter method) (vertica_sdk.ParamWriter method) (vertica_sdk.PartitionWriter method) (vertica_sdk.StreamWriter method) setDate() (vertica_sdk.BlockWriter method) (vertica_sdk.ParamWriter method) (vertica_sdk.PartitionWriter method) (vertica_sdk.StreamWriter method) setEncoding() (vertica_sdk.InputBuffer method) (vertica_sdk.OutputBuffer method) setFloat() (vertica_sdk.BlockWriter method) (vertica_sdk.ParamWriter method) (vertica_sdk.PartitionWriter method) (vertica_sdk.StreamWriter method) setHook() (vertica_sdk.BlockWriter method) (vertica_sdk.PartitionWriter method) (vertica_sdk.StreamWriter method) setInt() (vertica_sdk.BlockWriter method) (vertica_sdk.ParamWriter method) (vertica_sdk.PartitionWriter method) (vertica_sdk.StreamWriter method) setInterval() (vertica_sdk.BlockWriter method) (vertica_sdk.ParamWriter method) (vertica_sdk.PartitionWriter method) (vertica_sdk.StreamWriter method) setIntervalYM() (vertica_sdk.BlockWriter method) (vertica_sdk.ParamWriter method) (vertica_sdk.PartitionWriter method) (vertica_sdk.StreamWriter method) |
setNull() (vertica_sdk.BlockWriter method) (vertica_sdk.PartitionWriter method) (vertica_sdk.StreamWriter method) setNumeric() (vertica_sdk.BlockWriter method) (vertica_sdk.ParamWriter method) (vertica_sdk.PartitionWriter method) (vertica_sdk.StreamWriter method) setPartitionOrderColumnIdx() (vertica_sdk.SizedColumnTypes method) setPrepass (vertica_sdk.TransformFunctionPhase attribute) setRow() (vertica_sdk.BlockWriter method) (vertica_sdk.PartitionWriter method) (vertica_sdk.StreamWriter method) setString() (vertica_sdk.BlockWriter method) (vertica_sdk.ParamWriter method) (vertica_sdk.PartitionWriter method) (vertica_sdk.StreamWriter method) setTime() (vertica_sdk.BlockWriter method) (vertica_sdk.ParamWriter method) (vertica_sdk.PartitionWriter method) (vertica_sdk.StreamWriter method) setTimestamp() (vertica_sdk.BlockWriter method) (vertica_sdk.ParamWriter method) (vertica_sdk.PartitionWriter method) (vertica_sdk.StreamWriter method) setTimestampTz() (vertica_sdk.BlockWriter method) (vertica_sdk.ParamWriter method) (vertica_sdk.PartitionWriter method) (vertica_sdk.StreamWriter method) setTimeTz() (vertica_sdk.BlockWriter method) (vertica_sdk.ParamWriter method) (vertica_sdk.PartitionWriter method) (vertica_sdk.StreamWriter method) setup (vertica_sdk.ScalarFunction attribute) (vertica_sdk.UDFilter attribute) (vertica_sdk.UDParser attribute) (vertica_sdk.UDXObject attribute) SizedColumnTypes (class in vertica_sdk) StreamState (class in vertica_sdk) StreamWriter (class in vertica_sdk) strictness (vertica_sdk.ScalarFunctionFactory attribute) |
T
| TRANSFORM (vertica_sdk.UDXType attribute) TransformFunction (class in vertica_sdk) TransformFunctionFactory (class in vertica_sdk) |
TransformFunctionPhase (class in vertica_sdk) TYPE (vertica_sdk.UDXType attribute) |
U
| UDFilter (class in vertica_sdk) UDParser (class in vertica_sdk) UDXFactory (class in vertica_sdk) |
UDXObject (class in vertica_sdk) UDXType (class in vertica_sdk) |
V
| VerticaType (class in vertica_sdk) |
volatility (vertica_sdk.ScalarFunctionFactory attribute) |
W
| write() (vertica_sdk.OutputBuffer method) |
6 - InputBuffer
class vertica_sdk.InputBuffer(inputstate)
Interface for reading a raw data stream.
Objects of this type wrap an in-memory buffer provided by Vertica.
Methods for retrieving data can return either raw data or decoded data.
Only one encoding may be specified for the stream. To specify an encoding
for the data stream, call setEncoding() before calling any other method
of this object.
advance(self, length=None)
Advance the buffer offset by the indicated number of characters. See peek().
Returns the new offset.
getOffset(self)
Return the current position from which data will be read.
getSize(self)
Return the number of characters in the buffer.
peek(self, length=None)
Copy data from the underlying buffer into Python.
If no encoding has been specified (via setEncoding()) this returns a bytes object containing raw data.
Otherwise, this returns data decoded into an object corresponding to the specified encoding
(for example, 'utf-8' would return a string).
If length is None, returns all available data.
If length is not None then the length of the returned object is at most what is requested.
This method does not advance the buffer offset.
read(self, length=None)
See peek().
This method does the same thing as peek(), but it also advances the
buffer offset by the number of characters consumed.
setEncoding(self, encoding)
Set the encoding of the data contained in the underlying buffer.
7 - InputState
class vertica_sdk.InputState
State of the current window in a raw input stream.
Vertica supplies this state as an argument to UDX methods
which process a vertica_sdk.InputBuffer.
OK The input is at the start or in the middle of the stream.
END_OF_FILE The input is the end of the stream. No further data is available.
8 - MultiPhaseTransformFunctionFactory
class vertica_sdk.MultiPhaseTransformFunctionFactory
Interface for declaring parameters and return types for a multi-phase function;
as well as declaring and instantiating its associated vertica_sdk.TransformFunction phases.
classmethod getPhases(cls, server_interface)
Called when Vertica needs a new TransformFunctionPhase pipeline
to process a multi-phase UDTF function call.
Vertica invokes the phases in order; collectively they behave like a TransformFunction.
More than one object may be instantiated per query.
Note
This function can be called several times per query.
getPrototype
Report, via the vertica_sdk.ColumnTypes argument return_types,
the return types of this UDX.
Returns None.
getReturnType
Report, via the vertica_sdk.SizedColumnTypes argument return_types,
the concrete return types of this UDX.
Returns None.
classmethod getUDXFactoryType(cls)
Returns vertica_sdk.UDXType.MULTI_TRANSFORM.
9 - OutputBuffer
class vertica_sdk.OutputBuffer
Interface for writing a raw data stream.
setEncoding(self, encoding)
Specify the encoding of the data written to the underlying buffer.
write(self, data)
Transfer bytes from the data object into Vertica.
If encoding is None, the data object will be implicitly converted to bytes.
Otherwise, the specified encoding will be used to convert the data to bytes.
The buffer offset will be advanced the number of bytes written.
Returns an object which is a slice of the input data object, corresponding to
any data which did not fit in the buffer.
10 - ParamReader
class vertica_sdk.ParamReader
Provides read access to a set of named parameters.
Type-specific methods can be used to retrieve values.
containsParameter(self, fieldName)
Returns True if there is a value for fieldName and False otherwise.
getBool(self, fieldName)
Returns a boolean value corresponding to the key fieldName.
Raises an error if there is no parameter fieldName.
getDate(self, fieldName)
Returns a datetime.date corresponding to the key fieldName.
Raises an error if there is no parameter fieldName.
getFloat(self, fieldName)
Returns a float corresponding to the key fieldName.
Raises an error if there is no parameter fieldName.
getInt(self, fieldName)
Returns an int corresponding to the key fieldName.
Raises an error if there is no parameter fieldName.
getInterval(self, fieldName)
Returns a datetime.timedelta corresponding to the key fieldName.
Raises an error if there is no parameter fieldName.
getIntervalYM(self, fieldName)
Returns a int corresponding to the key fieldName whose
value represents an interval in months.
Raises an error if there is no parameter fieldName.
getNumeric(self, fieldName)
Returns a decimal.Decimal corresponding to the key fieldName.
Raises an error if there is no parameter fieldName.
getParamNames(self)
Returns a list containing the names of all of the parameters.
getString(self, fieldName)
Returns a str corresponding to the key fieldName.
Raises an error if there is no parameter fieldName.
getTime(self, fieldName)
Returns a datetime.time corresponding to they key fieldName.
The timezone is fixed to UTC.
Raises an error if there is no parameter fieldName.
getTimeTz(self, fieldName)
Returns a datetime.time corresponding to they key fieldName.
The timezone is a constant offset from UTC.
Raises an error if there is no parameter fieldName.
getTimestamp(self, fieldName)
Returns a datetime.datetime corresponding to they key fieldName.
Raises an error if there is no parameter fieldName.
getTimestampTz(self, fieldName)
Returns a datetime.datetime corresponding to they key fieldName.
Raises an error if there is no parameter fieldName.
isEmpty(self)
Returns True if there are no parameters and False otherwise.
11 - ParamWriter
class vertica_sdk.ParamWriter
Provides write access to a set of named parameters.
Type-specific methods can be used to retrieve or set values.
containsParameter(self, fieldName)
Returns True if there is a value for fieldName and False otherwise.
getBool(self, fieldName)
Returns a boolean value corresponding to the key fieldName.
Raises an error if there is no parameter fieldName.
getDate(self, fieldName)
Returns a datetime.date corresponding to the key fieldName.
Raises an error if there is no parameter fieldName.
getFloat(self, fieldName)
Returns a float corresponding to the key fieldName.
Raises an error if there is no parameter fieldName.
getInt(self, fieldName)
Returns an int corresponding to the key fieldName.
Raises an error if there is no parameter fieldName.
getInterval(self, fieldName)
Returns a datetime.timedelta corresponding to the key fieldName.
Raises an error if there is no parameter fieldName.
getIntervalYM(self, fieldName)
Returns a int corresponding to the key fieldName whose
value represents an interval in months.
Raises an error if there is no parameter fieldName.
getNumeric(self, fieldName)
Returns a decimal.Decimal corresponding to the key fieldName.
Raises an error if there is no parameter fieldName.
getParamNames(self)
Returns a list containing the names of all of the parameters.
getString(self, fieldName)
Returns a str corresponding to the key fieldName.
Raises an error if there is no parameter fieldName.
getTime(self, fieldName)
Returns a datetime.time corresponding to the key fieldName.
The timezone is fixed to UTC.
Raises an error if there is no parameter fieldName.
getTimeTz(self, fieldName)
Returns a datetime.time corresponding to then key fieldName.
The timezone is a constant offset from UTC.
Raises an error if there is no parameter fieldName.
getTimestamp(self, fieldName)
Returns a datetime.datetime corresponding to the key fieldName.
Raises an error if there is no parameter fieldName.
getTimestampTz(self, fieldName)
Returns a datetime.datetime corresponding to the key fieldName.
Raises an error if there is no parameter fieldName.
isEmpty(self)
Returns True if there are no parameters and False otherwise.
setBool(self, fieldName, value)
Write a boolean value for the parameter fieldName.
Returns None.
setDate(self, fieldName, value)
Write a datetime.datetime or datetime.date value for the parameter fieldName.
Returns None.
setFloat(self, fieldName, value)
Write a float value for the parameter fieldName.
Returns None.
setInt(self, fieldName, value)
Write an int value for the parameter fieldName.
Returns None.
setInterval(self, fieldName, value, precision, range)
Write a datetime.timedelta value for the parameter fieldName.
Returns None.
setIntervalYM(self, fieldName, value, range)
Write an int number of months as an IntervalYM for the parameter fieldName.
range is an int for the maximum range of the IntervalYM type.
Returns None.
setNumeric(self, fieldName, value, precision, scale)
Write a decimal.Decimal value for the parameter fieldName.
precision and scale are the precision and scale of the Numeric type, respectively.
Returns None.
setString(self, fieldName, value)
Write a str value for the parameter fieldName.
Returns None.
setTime(self, fieldName, value, precision)
Write a datetime.time value for the parameter fieldName.
precision is the precision of the Time type.
Returns None.
setTimeTz(self, fieldName, value, precision)
Write a datetime.time value (with tzinfo) for the parameter fieldName.
precision is the precision of the Time type.
Returns None.
setTimestamp(self, fieldName, value, precision)
Write a datetime.datetime object with appropriate time-zone awareness
for the parameter fieldName.
Returns None.
setTimestampTz(self, fieldName, value, precision)
Write a datetime.datetime object with appropriate time-zone awareness
for the parameter fieldName.
Returns None.
12 - ParserFactory
class vertica_sdk.ParserFactory
Produces vertica_sdk.UDParser objects, which transform a raw data stream
into Vertica tuples.
vertica_sdk.ParserFactory implementations should be stateless.
Modifications to instance, class, or global variables might not be persisted.
classmethod canApportionParser(cls)
Return True if parsers produced by this factory can handle input states
vertica_sdk.InputState.START_OF_PORTION and vertica_sdk.InputState.END_OF_PORTION.
Return False otherwise.
classmethod getParserReturnType(self, serverInterface, perColumnParamReader, planContext, argTypes, returnTypes)
Set the concrete return types for a query with the provided parameters.
This method will be called after plan() in a single query, and may be called multiple
times.
argTypes is a vertica_sdk.SizedColumnTypes object indicating the column types of
the target table. Implementations of this method should validate that these are supported
types.
Parser return types should be added to returnTypes,
a vertica_sdk.SizedColumnTypes object.
serverInterface is a vertica_sdk.ServerInterface object which provides
access to server functionality, including session and statement parameters.
perColumnParamReader is a vertica_sdk.PerColumnParamReader object, which
provides access to column-specific parameters passed to the query.
planContext is a vertica_sdk.PlanContext object which
contains any data which was stored during a call to plan().
The default implementation sets the return types to be the same as the arg types.
Returns None.
classmethod getUDXFactoryType(cls)
Returns vertica_sdk.UDXType.LOAD_PARSER.
classmethod plan(self, serverInterface, perColumnParamReader, planContext)
Execute any logic required at query plan time.
This method is run once per query on the initiator node.
If it raises an exception, the query will not proceed.
serverInterface is a vertica_sdk.ServerInterface object which provides
access to server functionality, including session and statement parameters.
perColumnParamReader is a vertica_sdk.PerColumnParamReader object, which
provides access to column-specific parameters passed to the query.
planContext is vertica_sdk.PlanContext object, for storing and retrieving data
which will be serialized and distributed to all nodes which
run the query plan.
classmethod prepare(self, serverInterface, perColumnParamReader, planContext, returnType)
Create a vertica_sdk.UDParser object for execution.
This method is run once per load thread on each node,
prior to the start of execution.
serverInterface is a vertica_sdk.ServerInterface object which provides
access to server functionality, including session and statement parameters.
It contains the same parameters as the ServerInterface argument to
plan() in the same query.
perColumnParamReader is a vertica_sdk.PerColumnParamReader object,
which provides access to column-specific parameters passed to the query.
It contains the smae parameters as the ServerInterface argument to
plan() in the same query.
planContext is a vertica_sdk.PlanContext object which
contains any data which was stored during a call to plan().
13 - 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.
14 - 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 or datetime.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 or collections.OrderedDict, where each key-value pair maps field name to field value
Returns 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 (with datetime.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().
15 - PerColumnParamReader
class vertica_sdk.PerColumnParamReader
Provides vertica_sdk.ParamReader objects for column-specific parameters
provided in a COPY statement.
containsColumns(self, columnName)
Returns True if any parameters have been provided for the column columnName
and False otherwise.
getColumnNames(self)
Returns a list of all columns with parameters.
getColumnParamReader(self, columnName)
Returns a vertica_sdk.ParamReader object containing
parameters for the column columnName.
16 - PlanContext
class vertica_sdk.PlanContext
Stores query plan state for sharing values between different methods of a
vertica_sdk.UDXFactory possibly on different nodes.
getClusterNodes(self)
Returns a list containing the name of each node in the cluster.
getReader(self)
Returns a vertica_sdk.ParamReader view for stored parameters.
getWriter(self)
Returns a vertica_sdk.ParamWriter for modifying the parameter context.
17 - RejectedRecord
class vertica_sdk.RejectedRecord
Contains information about a record rejected by a user-defined Parser.
getData
Returns the rejected record data.
getReason
Returns the reason the record was rejected.
getTerminator
Returns a terminator for the rejected record data.
18 - ScalarFunction
class vertica_sdk.ScalarFunction
Interface for a user-defined scalar function.
A scalar function produces a single value for each row of input data.
destroy
Perform per instance destruction.
processBlock
Invoke the scalar function on a batch of rows contained in arg_reader,
a vertica_sdk.BlockReader object.
Output is written to res_writer, a vertica_sdk.BlockWriter object.
setup
Perform per instance initialization.
19 - ScalarFunctionFactory
class vertica_sdk.ScalarFunctionFactory
classmethod createScalarFunction(cls, server_interface)
Create and return an instance of the associated vertica_sdk.ScalarFunction class
for query execution.
Parameters for this function can be read from the server_interface
argument (a vertica_sdk.ServerInterface object).
This may be called more than once per query.
classmethod getUDXFactoryType(cls)
Returns vertica_sdk.UDXType.SCALAR.
strictness = 0
volatility = 0
20 - Search
Please activate JavaScript to enable the search
functionality.
From here you can search these documents. Enter your search
words into the box below and click "search". Note that the search
function will automatically search for all of the words. Pages
containing fewer words won't appear in the result list.
21 - ServerInterface
class vertica_sdk.ServerInterface
getDatabaseName(self)
Returns the name of the database in which this code is executed.
getLocale(self)
Returns the locale of the current session.
getNodeName(self)
Returns the name of the vertica node on which this code is executed.
getParamReader(self)
Allows the ability to access parameter values using their names.
Returns a vertica_sdk.ParamReader containing named parameters for a UDX.
getUDSessionParamReader(self, nsp)
Returns a vertica_sdk.ParamReader for a user-defined session parameter namespace.
getUserName(self)
Returns the username of the current session.
log(self, message)
Logs a message.
Returns None.
reportError(self, code, text, hint=u'', detail=u'')
reportInfo(self, code, text, hint=u'', detail=u'')
reportNotice(self, code, text, hint=u'', detail=u'')
reportWarning(self, code, text, hint=u'', detail=u'')
22 - SessionParamWriterMap
class vertica_sdk.SessionParamWriterMap
Interface for writing user-defined session parameters.
containsNamespace(self, nsp)
Returns True if there is a namespace nsp and False otherwise.
getNamespaces(self)
Returns a list of all parameter namespaces.
getUDSessionParamWriter(self, nsp)
Returns a vertica_sdk.ParamWriter object corresponding to the namespace nsp.
23 - SizedColumnTypes
class vertica_sdk.SizedColumnTypes
Stores type metadata for a collection of columns.
Includes type mod information, such as string length and numeric percision
information.
addArrayType(self, element, maxElems, fieldName=u'')
Adds an ARRAY-typed column with its element typed according to the ‘element’ argument.
Returns None.
addBinary(self, size, field_name=u'')
Adds a binary column to the list of columns.
Returns None.
addBinaryOrderColumn(self, size, field_name=u'')
Adds an order column of type BINARY
Returns None.
addBinaryPartitionColumn(self, size, field_name=u'')
Adds a partition column of type BINARY
Returns None.
addBool(self, field_name=u'')
Adds a bool column to the list of columns.
Returns None.
addBoolOrderColumn(self, field_name=u'')
Adds an order column of type BOOLEAN
Returns None.
addBoolPartitionColumn(self, field_name=u'')
Adds a partition column of type BOOLEAN
Returns None.
addChar(self, size, field_name=u'')
Adds a char column to the list of columns.
Returns None.
addCharOrderColumn(self, size, field_name=u'')
Adds an order column of type CHAR
Returns None.
addCharPartitionColumn(self, size, field_name=u'')
Adds a partition column of type CHAR
Returns None.
addColumn(self, vertica_type, field_name=u'')
Adds a column with the given vertica_sdk.VerticaType and name to the list of columns.
Returns None.
addDate(self, field_name=u'')
Adds a date column to the list of columns.
Returns None.
addDateOrderColumn(self, field_name=u'')
Adds an order column of type DATE
Returns None.
addDatePartitionColumn(self, field_name=u'')
Adds a partition column of type DATE
Returns None.
addFloat(self, field_name=u'')
Adds a float column to the list of columns.
Returns None.
addFloatOrderColumn(self, field_name=u'')
Adds an order column of type FLOAT
Returns None.
addFloatPartitionColumn(self, field_name=u'')
Adds a partition column of type FLOAT
Returns None.
addInt(self, field_name=u'')
Adds an int column to the list of columns.
Returns None.
addIntOrderColumn(self, field_name=u'')
Adds an order column of type INTEGER
Returns None.
addIntPartitionColumn(self, field_name=u'')
Adds a partition column of type INTEGER
Returns None.
addInterval(self, field_name=u'')
Adds a interval column to the list of columns.
Returns None.
addIntervalOrderColumn(self, field_name=u'')
Adds an order column of type INTERVAL/INTERVAL DAY TO SECOND
Returns None.
addIntervalPartitionColumn(self, field_name=u'')
Adds a partition column of type INTERVAL/INTERVAL DAY TO SECOND
Returns None.
addIntervalYM(self, field_name=u'')
Adds a year-to-month interval column to the list of columns.
Returns None.
addIntervalYMOrderColumn(self, field_name=u'')
Adds an order column of type INTERVAL YEAR TO MONTH
Returns None.
addIntervalYMPartitionColumn(self, field_name=u'')
Adds a partition column of type INTERVAL YEAR TO MONTH
Returns None.
addLongVarbinary(self, size, field_name=u'')
Adds a long varbinary column to the list of columns.
Returns None.
addLongVarbinaryOrderColumn(self, size, field_name=u'')
Adds an order column of type LONG VARBINARY
Returns None.
addLongVarbinaryPartitionColumn(self, size, field_name=u'')
Adds a partition column of type LONG VARBINARY
Returns None.
addLongVarchar(self, size, field_name=u'')
Adds a long varchar column to the list of columns.
Returns None.
addLongVarcharOrderColumn(self, size, field_name=u'')
Adds an order column of type LONG VARCHAR
Returns None.
addLongVarcharPartitionColumn(self, size, field_name=u'')
Adds a partition column of type LONG VARCHAR
Returns None.
addNumeric(self, precision, scale, field_name=u'')
Adds a numeric column to the list of columns.
Returns None.
addNumericOrderColumn(self, precision, scale, field_name=u'')
Adds an order column of type NUMERIC
Returns None.
addNumericPartitionColumn(self, precision, scale, field_name=u'')
Adds a partition column of type NUMERIC
Returns None.
addOrderColumn(self, vertica_type, field_name=u'')
Adds an order column with the given vertica_sdk.VerticaType and name to the list of columns.
(only relevant to multiphase UDTs.)
Returns None.
addPartitionColumn(self, vertica_type, field_name=u'')
Adds a partition column with the given vertica_sdk.VerticaType and name to the list of columns.
(only relevant to multiphase UDTs.)
Returns None.
addRowType(self, fields, fieldName=u'')
Adds a ROW-typed column with its fields typed according to the ‘fields’ argument.
Returns None.
addTime(self, field_name=u'')
Adds a time column to the list of columns.
Returns None.
addTimeOrderColumn(self, field_name=u'')
Adds an order column of type TIME
Returns None.
addTimePartitionColumn(self, field_name=u'')
Adds a partition column of type TIME
Returns None.
addTimeTz(self, field_name=u'')
Adds a timetz column to the list of columns.
Returns None.
addTimeTzOrderColumn(self, field_name=u'')
Adds an order column of type TIME WITH TIMEZONE
Returns None.
addTimeTzPartitionColumn(self, field_name=u'')
Adds a partition column of type TIME WITH TIMEZONE
Returns None.
addTimestamp(self, field_name=u'')
Adds a timestamp column to the list of columns.
Returns None.
addTimestampOrderColumn(self, field_name=u'')
Adds an order column of type TIMESTAMP
Returns None.
addTimestampPartitionColumn(self, field_name=u'')
Adds a partition column of type TIMESTAMP
Returns None.
addTimestampTz(self, field_name=u'')
Adds a timestamptz column to the list of columns.
Returns None.
addTimestampTzOrderColumn(self, field_name=u'')
Adds an order column of type TIMESTAMP WITH TIMEZONE
Returns None.
addTimestampTzPartitionColumn(self, field_name=u'')
Adds a partition column of type TIMESTAMP WITH TIMEZONE
Returns None.
addUuid(self, field_name=u'')
Adds a column of type UUID
Returns None.
addUuidOrderColumn(self, field_name=u'')
Adds an order column of type UUID
Returns None.
addVarbinary(self, size, field_name=u'')
Adds a varbinary column to the list of columns.
Returns None.
addVarbinaryOrderColumn(self, size, field_name=u'')
Adds an order column of type VARBINARY
Returns None.
addVarbinaryPartitionColumn(self, size, field_name=u'')
Adds a partition column of type VARBINARY
Returns None.
addVarchar(self, size, field_name=u'')
Adds a varchar column to the list of columns.
Returns None.
addVarcharOrderColumn(self, size, field_name=u'')
Adds an order column of type VARCHAR
Returns None.
addVarcharPartitionColumn(self, size, field_name=u'')
Adds a partition column of type VARCHAR
Returns None.
copyTypesFrom(self, other)
Appends the types from the provided vertica_sdk.SizedColumnTypes onto the current one.
Returns None.
getArgumentColumns(self)
Returns indexes of argument columns.
Indexes in cols can be used in conjunction with other functions,
e.g. getColumnType(idx) and getColumnName(idx).
getColumnCount(self)
Returns the number of columns.
getColumnName(self, idx)
Returns the name of the indicated column.
getColumnType(self, idx)
Returns a vertica_sdk.VerticaType object describing the SQL type of the
indicated column.
getLastOrderColumnIdx(self)
Gets the last ORDER BY column index
For example, it returns 5 in case of OVER(PARTITION BY a, b, c ORDER BY d, e, f).
getLastPartitionColumnIdx(self)
Gets the last PARTITION BY column index
For example, it returns 2 in case of OVER(PARTITION BY a, b, c ORDER BY d, e, f).
getOrderByColumns(self)
Returns indexes of ORDER BY columns in the OVER() clause.
Indexes in cols can be used in conjunction with other functions,
e.g. getColumnType(idx) and getColumnName(idx).
getPartitionByColumns(self)
Returns indexes of PARTITION BY columns in the OVER() clause.
Indexes in cols can be used in conjunction with other functions,
e.g. getColumnType(idx) and getColumnName(idx).
isOrderByColumn(self, idx)
Returns a boolean indicating whether the column at the specified index is an ORDER BY column.
isPartitionByColumn(self, idx)
Returns a boolean indicating whether the column at the specified index is a PARTITION BY column.
static makeArrayType(element, maxElems, fieldName=u'')
static makeBinary(size, field_name=u'')
static makeBool(field_name=u'')
static makeChar(size, field_name=u'')
static makeDate(field_name=u'')
static makeEmpty()
static makeFloat(field_name=u'')
static makeInt(field_name=u'')
static makeInterval(field_name=u'')
static makeIntervalYM(field_name=u'')
static makeLongVarbinary(size, field_name=u'')
static makeLongVarchar(size, field_name=u'')
static makeNumeric(precision, scale, field_name=u'')
static makeRowType(fields, fieldName=u'')
static makeTime(field_name=u'')
static makeTimeTz(field_name=u'')
static makeTimestamp(field_name=u'')
static makeTimestampTz(field_name=u'')
static makeUuid(field_name=u'')
static makeVarbinary(size, field_name=u'')
static makeVarchar(size, field_name=u'')
reset(self)
INTERNAL
setPartitionOrderColumnIdx(self, partition_idx, order_idx)
Sets the PARTITION BY and ORDER BY column indexes.
Returns None.
24 - StreamState
class vertica_sdk.StreamState
State of stream processing.
UDX methods which process a vertica_sdk.InputBuffer return this state to Vertica to indicate
how stream processing should proceed.
INPUT_NEEDED More input data is required to continue processing the stream.
OUTPUT_NEEDED More output space is needed to continue processing the stream.
DONE Stream processing has completed.
REJECT(rejected_record)
Data from the stream is invalid.
rejected_record should be a vertica_sdk.RejectedRecord object.
KEEP_GOING Stream processing must block before consuming any more input or producing any more output.
CHUNK_ALIGNED A block boundary has been identified.
25 - StreamWriter
class vertica_sdk.StreamWriter
Iterator-based write interface for producing a stream of output tuples.
Automatically makes space a block at a time, as needed.
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.
getTotalRowCount(self)
Returns the total number of rows written.
getTypeMetadata(self)
Returns a vertica_sdk.SizedColumnTypes object describing the column types of this writer.
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, idx, value)
Write a bytes object into the indicated zero-indexed column of the current row.
Returns None.
setBool(self, idx, value)
Write a boolean value into the indicated zero-indexed column of the current row.
Returns None.
setDate(self, idx, value)
Write a datetime.datetime or datetime.date object into the indicated zero-indexed column
of the current row.
Returns None.
setFloat(self, idx, value)
Write a float value into the indicated zero-indexed column of the current row.
Returns None.
setHook(self, col)
setInt(self, idx, value)
Write an int value into the indicated zero-indexed column of the current row.
Returns None.
setInterval(self, idx, value)
Write a datetime.timedelta object into the indicated zero-indexed column of the
current row.
Returns None.
setIntervalYM(self, idx, value)
Write a datetime.timedelta object into the indicated zero-indexed column of the
current row.
Returns None.
setNull(self, idx)
Set the indicated zero-indexed column of the current row to NULL.
Returns None.
setNumeric(self, idx, 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 or collections.OrderedDict, where each key-value pair maps field name to field value
Returns None.
setString(self, idx, value)
Write a str into the indicated zero-indexed column of the current row.
Returns None.
setTime(self, idx, value)
Write a datetime.time object (with tzinfo) into the indicated zero-indexed
column of the current row.
Returns None.
setTimeTz(self, idx, value)
Write a datetime.time object into the indicated zero-indexed column of the current row.
Returns None.
setTimestamp(self, idx, 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, idx, value)
Alias for setTimestamp().
26 - TransformFunction
class vertica_sdk.TransformFunction
Interface for a user-defined transform function.
A transform function operates on a table segment and returns zero or
more rows of data.
processPartition
Invoke the transform function on a set of rows contained in partition_reader,
a vertica_sdk.PartitionReader object. Each call processes
an entire partition of rows.
Output is written to partition_writer, a vertica_sdk.PartitionWriter object.
27 - TransformFunctionFactory
class vertica_sdk.TransformFunctionFactory
Interface for declaring parameters and return types for, and
instantiating, an associated vertica_sdk.TransformFunction.
classmethod createTransformFunction(cls, server_interface)
Create and return an instance of the associated vertica_sdk.TransformFunction class
for query execution.
Parameters for this function can be read from the server_interface
argument (a vertica_sdk.ServerInterface object).
This method is called after query local planning, just before
execution begins. It may be called more than once per query.
classmethod getUDXFactoryType(cls)
Returns vertica_sdk.UDXType.TRANSFORM.
28 - TransformFunctionPhase
class vertica_sdk.TransformFunctionPhase
Interface to provide compile-time information for a single phase of a
multi-phase user-defined transform function.
classmethod createTransformFunction(cls, server_interface)
Create and return an instance of the associated vertica_sdk.TransformFunction class
for execution of this phase.
Parameters for this function can be read from the server_interface
argument (a vertica_sdk.ServerInterface object).
getReturnType
Report, via the vertica_sdk.SizedColumnTypes argument return_types,
the concrete return types of this UDX.
Returns None.
isPrepass
Returns the prepass status of this phase
setPrepass
Indicates that this phase is a pre-pass and runs on local data (i.e., runs before any data movement)
Note
Only the first phase of a multi-phase transform function can be marked as prepass.
When it is not marked as prepass and the OVER clause contains no PARTITION BY,
the input data is moved to initiator before running the first phase.
29 - UDFilter
class vertica_sdk.UDFilter
Transforms a stream of raw input data.
destroy
Performs any per-stream deinitialization.
Session parameters can be persisted using udSessionParams,
a vertica_sdk.SessionParamWriterMap object.
Returns None.
process
Read data from input (a vertica_sdk.InputBuffer object)
and write data to output (a vertica_sdk.OutputBuffer object).
Returns a vertica_sdk.StreamState to indicate the state of stream processing.
setup
Performs any per-stream initialization.
Returns None.
30 - UDParser
class vertica_sdk.UDParser
Transforms a stream of raw input data into tuples.
destroy
Performs any per-stream deinitialization.
Session parameters can be persisted using udSessionParams,
a vertica_sdk.SessionParamWriterMap object.
Returns None.
process
Read data from input (a vertica_sdk.InputBuffer object)
and write tuples to stream_writer (a vertica_sdk.StreamWriter object).
Returns a vertica_sdk.StreamState to indicate the state of stream processing.
setup
Performs any per-stream initialization.
Returns None.
31 - UDXFactory
class vertica_sdk.UDXFactory
getParameterType
Report, via the vertica_sdk.SizedColumnTypes object parameterTypes,
the names and types of parameters used by this UDX.
Returns None.
getPerInstanceResources
Request resources for each instance of the UDX class produced by this factory.
Returns a vertica_sdk.VResources object representing that request.
getPrototype
Report, via the vertica_sdk.ColumnTypes argument return_types,
the return types of this UDX.
Returns None.
getReturnType
Report, via the vertica_sdk.SizedColumnTypes argument return_types,
the concrete return types of this UDX.
Returns None.
classmethod getUDXFactoryType(cls)
Returns a string representing the type of this UDX.
32 - UDXObject
class vertica_sdk.UDXObject
Base class of all UDX types.
destroy
Perform per instance destruction.
setup
Perform per instance initialization.
33 - UDXType
The type of UDx instance a factory produces.
class vertica_sdk.UDXType
Namespace for holding type constants.
AGGREGATE = 'AGGREGATE'
ANALYTIC = 'ANALYTIC'
FILESYSTEM = 'FILESYSTEM'
INVALID_UDX = 'INVALID_UDX'
KEYMANAGER = 'KEYMANAGER'
LOAD_FILTER = 'LOAD_FILTER'
LOAD_PARSER = 'LOAD_PARSER'
LOAD_SOURCE = 'LOAD_SOURCE'
MULTI_TRANSFORM = 'MULTI_TRANSFORM'
SCALAR = 'SCALAR'
TRANSFORM = 'TRANSFORM'
TYPE = 'TYPE'
34 - VerticaType
class vertica_sdk.VerticaType
Stores column type metadata.
getArrayBound(self)
getElementType(self)
Returns the element type for this array type. Throws an exception on non-arrays.
getFieldName(self, idx)
Returns the name of the field at position idx for this row type. Throws an exception for non-rows.
getFieldType(self, idx)
Returns the field type at position idx for this row type. Throws an exception for non-rows.
getIntervalPrecision(self)
Returns the precision of this INTERVAL type.
No type checking is applied. Results for
non-interval types are unspecified.
getIntervalRange(self)
Returns the range of this INTERVAL type as an int.
No type checking is applied. Results for
non-interval types are unspecified.
getMaxSize(self)
Returns the maximum size, in bytes, of a data element of this type.
getNumFields(self)
Returns the number of fields in this ROW type. Throws an exception for non-rows.
getNumericFractional(self)
Returns the number of fractional digits (i.e. digits right of the decimal point) of this NUMERIC type.
No type checking is applied. Results for
non-numeric types are unspecified.
getNumericIntegral(self)
Returns the number of integral digits (i.e. digits left of the decimal point) of this NUMERIC type.
No type checking is applied. Results for
non-numeric types are unspecified.
getNumericPrecision(self)
Returns the precision of this NUMERIC type.
No type checking is applied. Results for
non-numeric types are unspecified.
getNumericScale(self)
Returns the scale of this NUMERIC type.
No type checking is applied. Results for
non-numeric types are unspecified.
getNumericWordCount(self)
Returns the number of words needed in memory to represent a value of this NUMERIC type.
No type checking is applied. Results for
non-numeric types are unspecified.
getPrettyPrintStr(self)
Returns a human-readable string representing this type (including typemod).
getStringLength(self, check_type=True)
Returns the maximum length of an element of this string data type.
Raises an error if the type is not a string type.
getTimePrecision(self)
Returns the precision of this TIME type.
No type checking is applied. Results for
non-time types are unspecified.
getTimestampPrecision(self)
Returns the precision of this TIMESTAMP type.
No type checking is applied. Results for
non-timestamp types are unspecified.
getTypeMod(self)
Returns the typemod of this type.
getTypeOid(self)
Returns the OID of this type.
getTypeStr(self)
Returns a string representing the base data type that this type represents.
isArrayType(self)
Returns True if this is any array type (1D or complex), False otherwise.
isBinary(self)
Returns True if this type is BINARY and False otherwise.
isBool(self)
Returns True if this type is BOOLEAN and False otherwise.
isChar(self)
Returns True if this type is CHAR and False otherwise.
isComplexArrayType(self)
Returns True if this is a complex array type, False otherwise.
isComplexRowType(self)
Returns True if this is a complex row type, False otherwise.
isDate(self)
Returns True if this type is DATE and False otherwise.
isFloat(self)
Returns True if this type is FLOAT and False otherwise.
isInt(self)
Returns True if this type is INTEGER and False otherwise.
isInterval(self)
Returns True if this type is INTERVAL and False otherwise.
isIntervalYM(self)
Returns True if this type is INTERVAL YEAR TO MONTH and False otherwise.
isLongVarbinary(self)
Returns True if this type is LONG VARBINARY and False otherwise.
isLongVarchar(self)
Returns True if this type is LONG VARCHAR and False otherwise.
isNumeric(self)
Returns True if this type is NUMERIC and False otherwise.
isStringType(self)
Returns True if this is any string type, e.g. CHAR, VARCHAR, BINARY, VARBINARY.
isTime(self)
Returns True if this type is TIME and False otherwise.
isTimeTz(self)
Returns True if this type is TIME WITH TIMEZONE (TIMETZ) and False otherwise.
isTimestamp(self)
Returns True if this type is TIMESTAMP and False otherwise.
isTimestampTz(self)
Returns True if this type is TIMESTAMP WITH TIMEZONE (TIMESTAMPTZ) and False otherwise.
isUUID(self)
Returns True if this type is UUID and False otherwise.
isVarbinary(self)
Returns True if this type is VARBINARY and False otherwise.
isVarchar(self)
Returns True if this type is VARCHAR and False otherwise.