Query
geneva.query.GenevaQuery
Bases: BaseModel
geneva.query.GenevaQueryBuilder
Bases: LanceEmptyQueryBuilder
A proxy that wraps LanceQueryBuilder and adds geneva-specific functionality.
select
select(
columns: list[str] | Mapping[str, str | UDF],
) -> Self
Select the output columns of the query.
Parameters:
-
columns(list[str] | Mapping[str, str | UDF]) –The columns to select.
If a list of strings, each string is the name of a column to select.
If a dictionary of strings then the key is the output name of the column and the value is either an SQL expression (str) or a UDF.
enable_internal_api
Enable internal APIs WARNING: Internal APIs are subject to change
with_fragments
Filter the rows of the table to only include the specified fragments.
with_row_address
Include the physical row address in the result WARNING: INTERNAL API DETAIL
with_where_as_bool_column
Include the filter selected column in the result instead of just selected rows
to_batches
to_batches(
batch_size: int | None = None,
*,
timeout: timedelta | None = None,
) -> RecordBatchReader
create_materialized_view
create_materialized_view(
conn: Connection, view_name: str
) -> Table
Creates a materialized view of the table.
The materialized view will be a table that contains the result of the query. The view will be populated via a pipeline job.
Parameters:
-
conn(Connection) –A connection to the database to create the view in.
-
view_name(str) –The name of the view to create.
Raises:
-
UserWarning–If the source table does not have stable row IDs enabled. Without stable row IDs, incremental refresh is only supported when refreshing to the same source version. Attempting to refresh to a different version will fail.