When you shard a database, querying and managing dozens or hundreds of physical tables individually is impractical. Data Management (DMS) solves this by generating a logical table — a unified view over a group of physical shards — so you can query, export, or change all of them through a single operation.
This document explains the logical table creation rule and how to trigger a manual update when needed.
Prerequisites
Before you begin, ensure that you have:
A configured logical database. For more information, see Logical database.
Multiple physical tables with the same table schema and table name prefix in the logical database.
How it works
A logical table is an abstraction over a group of physical tables (the underlying shards). DMS maps physical tables to a single logical table so you can query and manage them as one unit:
Physical tables: the actual shards in your database, such as
test_0,test_1,test_2, andtest_3.Logical table: the unified view that DMS generates, named after the shared prefix of those shards — in this case,
test(expressed astest_[0-3]).
Logical table creation rule
DMS generates a logical table for a group of physical tables when both conditions are met:
The physical tables have the same table schema.
The physical tables share the same table name prefix.
The logical table takes the shared prefix as its name. For example:
Logical database
├── test_0
├── test_1
├── test_2
└── test_3DMS generates one logical table named test, with the expression test_[0-3].
If a physical table's schema is unique in the logical database — meaning no other table shares the same schema — DMS cannot generate a logical table for it. If you configure a logical database but cannot find the expected logical table in the DMS console, verify that all relevant physical tables share the same table schema and table name prefix, then update the logical table.
Update the logical table
To regenerate the logical table, trigger a re-extraction:
Go to the DMS console V5.0.
In the top navigation bar, click Data Assets. In the left-side navigation pane, click Global Search.
Enter the name of the logical database in the search box and click the
icon.Find the logical database, move the pointer over More in the Actions column, and select Re-extract Table.
DMS parses the metadata of all physical tables in the logical database and generates logical tables for those that meet the creation rule.
What's next
Once a logical table is generated, you can manage it as a single unit — DMS handles distributing operations to each physical table automatically:
Data query: Query the logical table on the SQL Console tab, just as you would query a single table. See Query a logical table.
Data export: Submit one data export ticket to export all data from the logical table. See Export databases.
Data change: Submit one data change ticket. DMS automatically runs the relevant SQL statements on each physical table. See Change regular data.
Schema design: Submit one schema change ticket. DMS automatically runs the relevant SQL statements on each physical table. See Design schemas and Change the schema of a logical table.