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: object

VAST Schema.

bucket: Bucket
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.

drop() None[source]

Delete this schema.

name: str
rename(new_name) None[source]

Rename this schema.

schema(name: str, fail_if_missing=True) Schema | None[source]

Get a specific schema (a container of tables) under this schema.

schemas(batch_size=None) Iterable[Schema][source]

List child schemas.

table(name: str, fail_if_missing=True) Table | None[source]

Get a specific table under this schema.

tablenames() List[str][source]

List all table names under this schema.

tables(table_name=None) List[Table][source]

List all tables under this schema.

property tx

VAST transaction used for this schema.