All Products
Search
Document Center

Data Lake Analytics - Deprecated:Metadata management of databases and tables based on tags and hierarchical structure

Last Updated:Apr 04, 2020

Background

Traditionally, the display and management of databases and tables are flat. All databases are directly listed. When you view a single database, all tables are listed. If a large number of databases are available or a single database has a large number of tables, it is difficult to view and manage them, as shown in the following figure.

Database list

Table list

In the preceding example, the database has 586 tables. You cannot directly view all the tables in the list. To solve this problem, you can use hierarchical management and classification management.

Hierarchical management

You can implement hierarchical management by adding tags in the statements for creating databases and tables.

  1. #Create a database.
  2. create schema x1 with dbproperties(
  3. tags='China. Zhejiang province, industry' --- Add tags
  4. )
  5. #Create a table
  6. create table yy(
  7. id int
  8. )with tblproperties(
  9. tags='Internet.IoT, Internet. Finance' --- Add tags
  10. )
  • “Tags” is a string that allows multiple tag words, which are separated with English symbols (commas, spaces, or semicolons). The tag word hierarchy is indicated by decimal point, for example 'Internet.IoT'and 'Internet. Finance'. Both these tags have two layers, with the same prefix ‘Internet’.

  • You can use tags to classify and manage database and table lists.