vastdb.schema
VAST Database schema (a container of tables).
VAST S3 buckets can be used to create Database schemas and tables. It is possible to list and access VAST snapshots generated over a bucket.
- class vastdb.schema.Schema(name: str, bucket: Bucket)[source]
Bases:
objectVAST Schema.
- create_schema(name: str, fail_if_exists=True) Schema[source]
Create a new schema (a container of tables) under this schema.
- create_table(table_name: str, columns: pyarrow.Schema, fail_if_exists=True, use_external_row_ids_allocation=False) Table[source]
Create a new table under this schema.
A virtual vastdb_rowid column (of int64 type) can be created to access and filter by internal VAST row IDs. See https://support.vastdata.com/s/article/UUID-48d0a8cf-5786-5ef3-3fa3-9c64e63a0967 for more details.
- name: str
- schema(name: str, fail_if_missing=True) Schema | None[source]
Get a specific schema (a container of tables) under this schema.
- table(name: str, fail_if_missing=True) Table | None[source]
Get a specific table under this schema.
- tables(table_name: str = '') List[Table][source]
List all tables under this schema if table_name is empty.
Otherwise, list only the specific table (if exists).
- property tx
VAST transaction used for this schema.