Table¶
-
class
beneath.
Table
[source]¶ Represents a data-plane connection to a table. To find or create a table, see
beneath.Client
.Use it to get a TableInstance, which you can query, replay, subscribe and write to. Learn more about tables and instances at https://about.beneath.dev/docs/concepts/tables/.
-
use_log
: bool¶ Whether log queries are supported for this table.
-
use_index
: bool¶ Whether index queries are supported for this table.
-
use_warehouse
: bool¶ Whether warehouse queries are supported for this table.
-
table_id
: uuid.UUID¶ The table ID
-
schema
: Schema¶ The table’s schema
-
primary_instance
: TableInstance¶ The current primary table instance. This is probably the object you will use to write/query the table.
-
async
find_instances
() → Iterable[beneath.instance.TableInstance][source]¶ Returns a list of all the table’s instances. Learn more about instances at https://about.beneath.dev/docs/concepts/tables/.
-
async
find_instance
(version: int)[source]¶ Finds an instance by version number Learn more about instances at https://about.beneath.dev/docs/concepts/tables/.
-
async
create_instance
(version: Optional[int] = None, make_primary=None, update_if_exists=None) → beneath.instance.TableInstance[source]¶ Creates and returns a new instance for the table. Learn more about instances at https://about.beneath.dev/docs/concepts/tables/.
- Parameters
version (int) – The version number to assign to the instance. If not set, will create a new instance with a higher version number than any previous instance for the table.
make_primary (bool) – Immediately make the new instance the table’s primary instance
update_if_exists (bool) – If true and an instance for
version
already exists, will update and return the existing instance.
-