Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.activeviam.com/llms.txt

Use this file to discover all available pages before exploring further.

property Tables.schema : object

Schema of the tables represented as a Mermaid entity relationship diagram. Each table is represented with 3 or 4 columns:
  1. whether the column’s default_value is None (denoted with nullable) or not
  2. the column data_type
  3. (optional) whether the column is part of the table keys (denoted with PK) or not
  4. the column name

Example

>>> table_a = session.create_table(
...     "Table a",
...     data_types={"foo": "String", "bar": "int"},
...     default_values={"bar": None},
... )
>>> table_b = session.create_table(
...     "Table b",
...     data_types={"bar": "int", "baz": "LocalDate"},
...     keys={"bar"},
... )
>>> table_c = session.create_table(
...     "Table c",
...     data_types={"foo": "String", "xyz": "double"},
...     keys={"foo", "xyz"},
... )
>>> table_d = session.create_table(
...     "Table d",
...     data_types={
...         "foo d": "String",
...         "xyz d": "double",
...         "abc d": "float",
...     },
...     default_values={"abc d": None},
...     keys={"foo d", "xyz d"},
... )
>>> table_a.join(table_b, table_a["bar"] == table_b["bar"])
>>> table_a.join(table_c, table_a["foo"] == table_c["foo"])
>>> table_c.join(
...     table_d,
...     (table_c["foo"] == table_d["foo d"])
...     & (table_c["xyz"] == table_d["xyz d"]),
... )
>>> schema = session.tables.schema