Manage catalogs, databases, and tables

Browse, create, and maintain catalogs, databases, and tables in a target workspace. Manage file storage handles volumes and files.

Prerequisites

For common calling rules, first read Prepare to call an API.

Prepare access for the target workspace. You need a target catalog before creating a database and a target database before creating a table. Before starting, use the browse and detail actions below to obtain required resource IDs.

Call sequence

  1. Browse accessible catalogs, databases, and tables to decide whether to use an existing hierarchy or create new resources. Save the IDs needed for later operations. Use the relevant read actions to inspect system databases, tables in a database, table overviews, or full paths when needed.

  2. To create a hierarchy, create the catalog first, then create a database in that catalog, and finally create a table in the target database.

  3. To read or verify data, get table information first, then preview or retrieve data as required.

  4. After an update, get the corresponding details to confirm current information. Before truncating or deleting, confirm the target object; query the object or data again afterward to confirm the result.

API operations

Browse the resource hierarchy

What you need to do

API operation

Use it when

Browse catalogs, databases, volumes, and tables

Browse the resource catalog

Select existing resources or before creating new resources.

Query catalogs

List Catalogs

Select a target catalog.

Query catalog details

Get Catalog details

Confirm current information for a target catalog.

Query databases

List databases

Select a target database.

Query database details

Get database details

Confirm a target database.

Query objects in a database

List database objects

Browse volumes, tables, and operators in a database.

View system databases

Get the system tree

Read system databases and their hierarchy.

View tables in a database

List database tables

Obtain tables under a specified database.

Create and maintain catalogs and databases

What you need to do

API operation

Use it when

Create a catalog

Create a Catalog

Create a parent catalog and obtain its ID for later database creation.

Update a catalog

Update a Catalog

Modify an existing catalog.

Delete a catalog

Delete a Catalog

You have handled lower-level objects.

View catalog references

List Catalog references

Check references before changing or deleting a catalog.

Create a database

Create a database

You identified the parent catalog.

Update a database

Update a database

Modify an existing database.

Delete a database

Delete a database

You confirmed that the database is not used by a publication or subscription.

Manage tables and table data

What you need to do

API operation

Use it when

Check whether a table exists

Check whether a table exists

Confirm a target table before creating or referencing it.

Create a table

Create a table

You identified the target database.

Query table information

Get table information

Confirm table definition and current information.

Batch query table information

Batch get table information

Read information for several known tables at once.

View a table overview

Get a table overview

View an aggregated current overview of a table.

View the full table path

Get the full table path

Confirm a table’s full resource-hierarchy path.

Query table data

Get table data

Read sampled data from a table.

Preview table data

Preview table data

Inspect table data first.

Download table data

Download table data

Obtain downloaded table data.

Run NL2SQL

Run NL2SQL

Convert a natural-language request to SQL and run it.

Truncate a table

Truncate a table

Delete all data while retaining the table definition after confirming the target table.

Delete a table

Delete a table

Delete a table and its data after confirming the target.

Query table references

List table references

Check references before changing or deleting a table.

Confirm the result

After creation or an update, get details for the corresponding catalog, database, or table to confirm the object used for later operations. Preview or sample-query data before reading it. After truncation, query table data again to confirm that content is cleared; after deletion, use the hierarchy or object list to confirm that the target no longer appears.

Limitations and notes

  • Deleting a catalog is irreversible; handle lower-level objects first.

  • Before deleting a database, confirm it is not used by a publication or subscription.

  • Truncating a table removes all data while retaining its definition and is irreversible. Deleting a table removes the table and its data.

  • A table-data query returns 100 rows by default when no explicit row count is supplied.

Next steps

Last updated on