Manage DLF Object tables

Updated at:

An Object Table provides metadata indexes for unstructured files, such as images and videos, in a specified object storage directory and presents the files as a virtual table. You can read an Object Table as a structured file list by using a SQL compute engine or access its files through PVFS. DLF manages Object Tables in catalogs and supports access control.

Prerequisites

Before you begin, make sure you have:

Create an Object Table

Create an Object Table in the console

  1. Log on to the DLF console

  2. In the left navigation menu, select Catalogs. Click your catalog name to open the catalog details page.

  3. In the Database section, click your database name.

  4. Click Create Table.

  5. Configure the following parameters and click OK.

    Parameter Description
    Table Format Select Object Table.
    Table Name Enter a table name. The name must be unique within the database.
    Table Description Enter a description.

Create an Object Table using SQL

If you have registered your DLF catalog in other systems like EMR Serverless Spark or Realtime Compute for Apache Flink, you can create databases and tables directly on those platforms using SQL. The metadata is written to DLF. For more information, see Engine integration.

Both examples use 'type'='object-table' to specify the table format.

After you create an Object Table, a SQL compute engine can read it as a structured file list.

Flink SQL — run in the Realtime Compute for Apache Flink console:

CREATE TABLE object_table WITH (
    'type'='object-table'
);

Spark SQL — run in the EMR Serverless Spark console:

CREATE TABLE object_table OPTIONS (
    'type'='object-table'
)

View an Object Table and configure permissions

  1. In the Database section, click your database name.

  2. On the Tables tab, click the Object Table name to view its details.

  3. On the Table Details tab, review the table's basic information and columns.

  4. On the Permissions tab, grant table permissions to DLF users or roles. For more information, see Data authorization management.

Access an Object Table through PVFS

Paimon provides a file system interface that lets you read data from an Object Table by using the following virtual path:

pvfs://catalog_name/database_name/table_name/file

Replace catalog_name, database_name, and table_name with your actual catalog, database, and table names. For more information, see PVFS.

Delete a data table

Warning

Deleting a table removes both its metadata and data. Data is retained for one day as a safeguard against accidental deletion. After one day, the data is permanently deleted.

  1. In the Database list, click a database name to open the table list.

  2. In the table list, click Delete in the Actions column.

  3. In the dialog box, click OK.

Deleted data tables can be restored during the metadata retention period. For more information, see Recycle bin.