Class: QgsArrowSchema

Wrapper around an ArrowSchema.

This object provides a helper to allow schemas to be passed to or returned from QGIS functions in C++ or Python. See the documentation for the Arrow C Data Interface for how to interact with the underlying ArrowSchema. https://arrow.apache.org/docs/format/CDataInterface.html

This object also stores the index of the geometry column that should be/will be populated from the geometry of iterated-over features.

Added in version 4.0.

class qgis.core.QgsArrowSchema[source]

Bases: object

__init__()

Construct invalid schema holder

__init__(other: QgsArrowSchema)

Copy constructor

Parameters:

other (QgsArrowSchema)

cSchemaAddress(self) int

Returns the address of the underlying ArrowSchema for import or export across boundaries

Warning

This is intended for advanced usage and may cause a crash if used incorrectly.

Return type:

int

exportToAddress(self, otherAddress: int)[source]

Export this array to the address of an empty ArrowSchema for export across boundaries

Warning

This is intended for advanced usage and may cause a crash if used incorrectly.

Parameters:

otherAddress (int)

geometryColumnIndex(self) int[source]

Returns the index of the column in this schema that should be populated with a feature geometry

Returns -1 if this value has not been specified.

Return type:

int

isValid(self) bool[source]

Returns True if this wrapper object holds a valid ArrowSchema

Return type:

bool

setGeometryColumnIndex(self, geometryColumnIndex: int)[source]

Set the index of the column in this schema that should be populated with a feature geometry

Parameters:

geometryColumnIndex (int)