Tables

Create a staging table

Changed on

Creates a new staging table instance. Staging tables are used during managed table creation. Creating a managed table requires performing two actions – initializing the table data in cloud storage and creating the named table entry in the catalog – and these should appear as an atomic operation to other operations on catalog tables. A staging table is used to allocate storage for the managed table, and the catalog_name.schema_name.name parameters provided in this request are used to initialize any required storage properties and determine the storage URL that should be used for the data contained by this table.

Temporary credentials can be obtained as though the staging table were a regular table to get access to the staging table’s storage. After the table’s data is initialized, the staging table is “promoted” to a managed table by creating a managed table with the same location as the staging table. This allows for the atomic creation of a managed table that already has full data written to its storage location. Note: the name provided must match the name used to initialize the staging table originally.

WARNING: This API is experimental and may change in future versions.

post/staging-tables

Request

  • Base URL
    http://localhost:8080/api/2.1/unity-catalog
  • Auth
    none declared

Request body

namestring required

Name of table, relative to parent schema.

catalog_namestring required

Name of parent catalog.

schema_namestring required

Name of parent schema relative to its parent catalog.

Response

The new staging table was successfully created.

namestring

Name of table, relative to parent schema.

catalog_namestring

Name of parent catalog.

schema_namestring

Name of parent schema relative to its parent catalog.

idstring

Unique identifier for the table.

staging_locationstring

URI generated for the staging table

Changes