Query
class Query
Used to execute a SQL query against table(s) in Redivis, using the Redivis SQL query syntax, and read out the results.
Constructors
| Execute a SQL query within the current default scope (either a dataset or project).
In a Redivis notebook, the default scope will always be the notebook's project, and the notebook's source table can be referenced via the |
| Execute a SQL query scoped to a specific dataset. Tables referenced by the query do not need to be fully qualified, since the table lookup is already scoped to the dataset. Consult the referencing resources documentation to learn more. |
| Execute a SQL query scoped to a specific project. Tables referenced by the query do not need to be fully qualified, since the table lookup is already scoped to the dataset. Consult the referencing resources documentation to learn more. |
Examples
Attributes
| A dict containing the API resource representation of the query. This will always be populated after the query has been created, and can be refreshed by calling |
Methods
| Download all files represented by a file_id variable in the query results to a local directory. |
Fetch query metadata. Once called, the | |
| Return a list of File instances for query results containing a file_id variable. |
| Deprecated. Return a list of named tuples referencing the rows of the query results. Use Query.to_arrow_table().to_pydict() instead. |
Return an iterator that yields pyarrow.RecordBatches, for processing the query results in a memory-efficient streaming manner. | |
| Return a pyarrow.dataset.Dataset for the query results. Data is backed by disk, allowing for larger-than-memory analysis. |
| Return a pyarrow.Table with the query results. |
| Deprecated. Please use to_[geo]pandas_dataframe instead. |
| Return a geopandas.GeoDataframe. For working with query results that contain a geography variable. |
| Return a dask.DataFrame. Data is backed by disk, allowing for larger-than-memory analysis. |
| Return a pandas.DataFrame with the query results. |
| Return a polars.LazyFrame. Data is backed by disk, allowing for larger-than-memory analysis. |
Last updated