schema list

Prev Next

This command displays VAST Databases and schemas. You can filter for a specific database and schema, or show schemas for all databases.

Usage

schema list [--database-name DATABASE]
            [--schema-name PARENT_SCHEMA]
            [--name SCHEMA]
            [--by-level LEVEL]
            [--page PAGE]
            [--page-size PAGE_SIZE]
            [--name-startswith PREFIX]

Options

--database-name DATABASE

Specifies the name of the database containing the schema.

--schema-name PARENT_SCHEMA

Specifies the name of a parent schema in the database. A parent schema has nested schemas within it.

--name SCHEMA

Specifies the name of a specific schema in the database. If --schema-name is also specified, this filters for nested schemas within the parent schema

For example, for a database containing these schemas:

a

a/b

a/b/c

a/b/d

then the combination of --schema-name b --name c will return c, while --schema-name b returns c,d .

by-level

If present, the output list shows schemas at a single level of nesting only.

For example, for the following schemas:

schema1

schema1/schema2

schema1/schema2/schema3

the command schema list --schema-name schema1 shows

schema1/schema2

schema1/schema2/schema3

while schema list --schema-name schema1 --by level shows only

schema1/schema2

and schema list --schema-name schema1/schema2 --by-level shows

schema1/schema2/schema3

--page PAGE

Specifies the specific page in the output list, by its number. This parameter is used only  if page-size is set. Default is the first page.

--page-size PAGE_SIZE

Specifies the maximum number of schema to list per output page. Default: 100.

--name-startswith PREFIX

Specifies a prefix to filter the schema names.

Example

This example returns all the schemas in a specific database, db1:

vcli: root> schema list --database-name db1
+--------------------------+---------------+------------+
| Name                     | Database-name | Properties |
+--------------------------+---------------+------------+
| schema_1                 | db1           |            |
| schema_1/nested_schema_1 | db1           |            |
| schema_2                 | db1           |            |
+--------------------------+---------------+------------+

This example shows the schemas in a specific parent schema, schema_1:

vcli: root> schema list --database-name db1 --schema-name schema_1
+--------------------------+---------------+------------+
| Name                     | Database-name | Properties |
+--------------------------+---------------+------------+
| schema_1/nested_schema_1 | db1           |            |
+--------------------------+---------------+------------+

This example shows a list filtered with the name-startswith parameter:

vcli: root> schema list --database-name db1 --name-startswith schema
+----------+---------------+------------+
| Name     | Database-name | Properties |
+----------+---------------+------------+
| schema_1 | db1           |            |
| schema_2 | db1           |            |
+----------+---------------+------------+