kaskada.table
Module Contents
Classes
Functions
|
Gets the table name from either the table protobuf, create table response, get table response, or a string |
|
Lists all tables the user has access to |
|
Gets a table by name |
|
Creates a table |
|
Deletes a table referenced by name |
|
Loads a local file to a table. The type of file is inferred from the extension. |
|
Loads a dataframe to a table. |
Attributes
- class PulsarTableSource(broker_service_url, admin_service_url, auth_plugin, auth_params, tenant, namespace, topic_name)[source]
Bases:
TableSource
- get_table_name(table)[source]
Gets the table name from either the table protobuf, create table response, get table response, or a string
- create_table(table_name, time_column_name, entity_key_column_name, subsort_column_name=None, grouping_id=None, source=None, client=None)[source]
Creates a table
- Parameters:
table_name (str) – The name of the table
time_column_name (str) – The time column
entity_key_column_name (str) – The entity key column
subsort_column_name (str, optional) – The subsort column. Defaults to None and Kaskada will generate a subsort column for the data.
grouping_id (str, optional) – The grouping id. Defaults to None.
source (TableSource, optional) – A configurable table source. Defaults to None.
client (Client, optional) – The Kaskada Client. Defaults to kaskada.KASKADA_DEFAULT_CLIENT.
- Returns:
Response from the API
- Return type:
table_pb.CreateTableResponse
- load(table_name, file, client=None)[source]
Loads a local file to a table. The type of file is inferred from the extension.
- load_dataframe(table_name, dataframe, client=None, engine='pyarrow')[source]
Loads a dataframe to a table.
This converts the dataframe to a Parquet file first, and then loads that file. If your dataframe was loaded from a Parquet file (or other supported format), it would be better to load that directly with
load()
- Parameters:
- Returns:
Response from the API.
- Return type:
table_pb.LoadDataResponse