atoti.Table#

final class atoti.Table#

In-memory table of a Session.

Example

>>> table = session.create_table(
...     "Example",
...     types={"Product": "String", "Quantity": "int"},
... )

Listing all the column names:

>>> list(table)
['Product', 'Quantity']

Testing if the table has a given column:

>>> "Product" in table
True
>>> "Price" in table
False

append

Add one or multiple rows to the table.

drop

Delete some of the table's rows.

head

Return at most n random rows of the table.

join

Define a join between this source table and the target table.

keys

Names of the key columns of the table.

load_arrow

Load an Arrow Table into this scenario.

load_csv

Load a CSV into this scenario.

load_kafka

Consume a Kafka topic and stream its records in the table.

load_numpy

Load a NumPy 2D array into this scenario.

load_pandas

Load a pandas DataFrame into this scenario.

load_parquet

Load a Parquet file into this scenario.

load_spark

Load a Spark DataFrame into this scenario.

load_sql

Load the result of the passed SQL query into the table.

name

Name of the table.

query

Query the table to retrieve some of its rows.

row_count

The number of rows in the table.

scenario

Scenario on which the table is.

scenarios

All the scenarios the table can be on.