A method for realizing multidimensional metadata joint query based on Atlas

By creating a custom type in the Apache Atlas service and using the REST API for classified storage and joint retrieval of multi-dimensional metadata, the problem that the Atlas service cannot perform joint query of multi-dimensional metadata is solved, and efficient query of multi-dimensional metadata is realized, reducing the cost development costs and failure rates.

CN113806366BActive Publication Date: 2024-10-18SHANDONG LANGCHAO YUNTOU INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111042924.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-07
Publication Date
2024-10-18
Estimated Expiration
2041-09-07

AI Technical Summary

Technical Problem

The existing Apache Atlas service cannot perform joint query of multi-dimensional metadata, which requires developers to perform hierarchical query and filtering processing through code, which increases development costs and failure rates.

Method used

By creating a custom Atlas type and using the REST API of the Atlas service for classified storage and joint retrieval, joint query of multi-dimensional metadata is achieved, including deploying the Atlas service, writing custom type information, and calling the REST API for data storage and query.

Benefits of technology

It achieves expansion without changing the underlying Atlas service module, reduces development costs and failure rates, supports joint query of multi-dimensional metadata, is suitable for a variety of scenarios, and has good promotion and application value.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113806366B_ABST
    Figure CN113806366B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for realizing multidimensional metadata joint query based on Atlas, and belongs to the field of data query technology. The method for realizing multidimensional metadata joint query based on Atlas of the present invention creates a custom Atlas type, performs classified storage according to the custom Atlas type, and performs classified query and joint retrieval according to the classified stored content. The method for realizing multidimensional metadata joint query based on Atlas of the present invention does not need to modify the source code of the underlying Atlas service module, that is, it can well realize the expansion of the underlying service, greatly reduce the development cost and failure rate, and has a good value for promotion and application.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data query, and specifically provides a method for realizing multidimensional metadata joint query based on Atlas. Background Art

[0002] With the advent of the cloud era, it is increasingly difficult to know where the data comes from and how it changes over time in the face of a massive and growing variety of data objects. The use of Hadoop must take into account the actual situation of data management, and metadata and data governance have become an important part of the enterprise-level data lake. Atlas is used to manage shared metadata, data classification, auditing, security, and data protection, and strives to integrate with Apache Ranger for data permission control policies. Apache Atlas is the data governance and metadata framework of Hadoop. It provides a scalable and extensible core basic data governance service set that enables enterprises to effectively and efficiently meet compliance requirements in Hadoop and allows integration with the entire enterprise data ecosystem.

[0003] However, in actual use, we often encounter scenarios that require multi-dimensional metadata joint query. Currently, the Atlas service itself does not provide this service content. The Atlas service only provides the creation of a single metadata type, and does not support joint query of multiple types. It cannot solve the situation of cross-type joint query, such as joint retrieval of metadata information of subordinate data tables based on the metadata information of the database, and reverse query of metadata information of its affiliated library based on the metadata information of the data table; or, directly cross-level query of various metadata information of subordinate data columns based on the metadata information of the database. These scenarios are common user scenarios. In daily processing, code is often used for hierarchical query and hierarchical filtering, which brings a lot of development workload to developers and a lot of development cost problems to project managers. There is an urgent need for a dynamic expansion method to solve this problem. Summary of the invention

[0004] The technical task of the present invention is to address the above-mentioned problems and provide a method for implementing multidimensional metadata joint query based on Atlas that does not require changing the source code of the underlying Atlas service module, that is, it can well implement the expansion of the underlying service and greatly reduce the development cost and failure rate.

[0005] To achieve the above object, the present invention provides the following technical solutions:

[0006] A method for realizing multi-dimensional metadata joint query based on Atlas, creating a custom Atlas type, performing classified storage according to the custom Atlas type, and performing classified query and joint retrieval according to the classified stored content.

[0007] Preferably, the method for implementing multidimensional metadata joint query based on Atlas includes the following steps:

[0008] S1. Deploy Atlas service in Hadoop ecosystem;

[0009] S2. Write custom type information, including but not limited to metadata ID, metadata name, metadata type, metadata creation time, metadata modification time, and metadata creation user;

[0010] S3. Call the custom type RestAPI of the Apache atlas service to create the above type;

[0011] S4, calling the REST API of the Apache atlas service to save data to save the metadata information of the database, the metadata information of the data table, and the metadata information of the data column;

[0012] S5. Call the corresponding REST API to write the metadata content of the database, schema, data table, and data column collected in the above steps into the defined database, schema, data table, and data column Type and entity respectively;

[0013] S6. Call the data query REST API of the Apache atlas service, insert the corresponding joint search parameters to perform search and query, and then return the result data.

[0014] Preferably, in step S1, the basic services that Atlas depends on are deployed, including the service registration center Zookeeper, the permission management service Ranger, the distributed file storage system HDFS, the distributed column database Hbase, and the graph database janusgraph.

[0015] Preferably, in step S2, the database metadata may be extended with metadata database name, metadata database type, and metadata database address information.

[0016] Preferably, the data table metadata can be extended with the metadata data table name, the Chinese name of the metadata data table, the metadata data table description, the metadata data table security level, the database ID to which the metadata data table belongs, the database type to which the metadata data table belongs, the data source ID to which the metadata data table belongs, the database type to which the metadata data table belongs, the data source ID to which the metadata data table belongs, the metadata data table version information, the metadata data table label value, and whether the metadata data table is the main annotation information.

[0017] Preferably, the data column metadata can be extended with the metadata data column name, the metadata data column Chinese name, the metadata data column description, the metadata data column length, the metadata data column precision, the metadata data column type, the model standard ID mounted on the metadata data column, the data dictionary ID mounted on the metadata data column, the metadata data column data format, the metadata data column security level, the ID of the data table to which the metadata data column belongs, the data source type to which the metadata data column belongs, and the data source ID information to which the metadata data column belongs.

[0018] Preferably, in step S3, the calling method is POST, and the corresponding parameters are passed in to create the corresponding type format. If successful, a success flag is returned and the type format after successful creation is returned. If unsuccessful, the call is corrected and then tried again.

[0019] Preferably, in step S4, different metadata information such as database metadata information, data table metadata information, and data column metadata information are saved at different levels.

[0020] Preferably, in step S5, the corresponding metadata contents are written into Atlas. The janusgraph graph data used at the bottom layer of Atlas is used as the storage engine, Hbase is used as the storage medium, and Solr service or ElasticSearch is used as the retrieval engine to perform add, delete, modify and query operations on the metadata information.

[0021] Preferably, in step S6, a query statement suitable for the customized Atlas type is assembled according to the query conditions passed in to perform the query. For example, when searching for subordinate metadata table information according to metadata database information, the metadata database information can be used as the input parameter and the distinguishing information column can be used as the search target type (data table type, corresponding to the constant value "table") to implement joint search and query to the target data set.

[0022] Compared with the prior art, the method for realizing multidimensional metadata joint query based on Atlas of the present invention has the following outstanding beneficial effects: the method for realizing multidimensional metadata joint query based on Atlas is based on the method of using the RESTAPI method provided by the underlying Atlas service to customize the Apache Atlas type, which well implements the expansion of the underlying service, and can be implemented without changing the source code of the underlying Atlas service module, greatly reducing the development cost and failure rate. The present invention also implements a storage mechanism of a set of two-dimensional tables based on the custom type method, which well saves all kinds of metadata information and realizes multidimensional joint query according to the input query conditions, which is suitable for a variety of scenarios requiring multidimensional metadata joint query and has good promotion and application value. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] Figure 1 It is a flow chart of the method for realizing multidimensional metadata joint query based on Atlas described in the present invention. DETAILED DESCRIPTION

[0024] The method for implementing multidimensional metadata joint query based on Atlas of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments.

[0025] Example

[0026] The method for realizing multi-dimensional metadata joint query based on Atlas of the present invention creates a customized Atlastype, classifies and stores according to the customized Atlas type, and performs classified query and joint retrieval according to the classified stored content. First, since the Apache Atlas service supports the customized type mode, the purpose of the customized type can be achieved by calling the REST API interface provided by the Apache Atlas service, so it is necessary to write customized type information and call the corresponding REST API interface, wherein the customized type information should at least include the database metadata information column, the data table metadata information column, the data column metadata information column, the column meta_type for distinguishing metadata attributes, and the name attribute value itself. Secondly, after customizing the type, you can call the underlying storage REST API interface of Apache Atlas to achieve the purpose of storage. When saving, the database only saves the data containing the database metadata information and meta_type and name. The meta_type storage value is "database" and the name storage value is the name value of the database. In addition to saving the data containing the data table metadata information, the data table also needs to query or obtain the metadata information items and meta_type and name of the upper-level database to which it belongs. The meta_type storage value is "table" and the name storage value is the name value of the data table. In addition to saving the data containing the data table metadata information, the data column also needs to query or obtain the metadata information items and meta_type and name of the upper-level database-level data table to which it belongs. The meta_type storage value is "column" and the name storage value is the name value of the data column. Finally, when calling the interface to perform a multi-dimensional metadata joint query of this type, pass in the conditions to be queried, such as querying the metadata information of all subordinate data tables according to the database name, that is, passing in db_name as the database name and type as "table" to query all metadata information of all tables whose db_name is the target database name and type is data table.

[0027] like Figure 1 As shown, the method for implementing multidimensional metadata joint query based on Atlas includes the following steps:

[0028] S1. Deploy Atlas service in Hadoop ecosystem.

[0029] Deploy the basic services that Atlas depends on, including the service registration center Zookeeper, the permission management service Ranger, the distributed file storage system HDFS, the distributed column database Hbase, and the graph database janusgraph. After all the dependent services are started normally, start the Atlas service and verify whether it is started normally. Call the custom type interface provided by the Apache Atlas service to create a custom type, further including that this custom type contains database metadata information, data table metadata information, data column metadata information, common metadata information, and distinguishing information columns; further including creating a metadata information containing all kinds of metadata and some columns for distinguishing metadata categories.

[0030] S2. Write custom type information, including but not limited to metadata ID, metadata name, metadata type, metadata creation time, metadata modification time, and metadata creation user.

[0031] 1) Database metadata can extend information such as metadata database name, metadata database type, metadata database address, etc.

[0032] 2) The data table metadata can be extended with information such as the metadata data table name, the Chinese name of the metadata data table, the metadata data table description, the metadata data table security level, the database ID to which the metadata data table belongs, the database type to which the metadata data table belongs, the data source ID to which the metadata data table belongs, the metadata data table version information, the metadata data table label value, and whether the metadata data table is the main table flag.

[0033] 3) Data column metadata can extend the metadata data column name, metadata data column Chinese name, metadata data column description, metadata data column length, metadata data column precision, metadata data column type, model standard ID mounted on the metadata data column, data dictionary ID mounted on the metadata data column, metadata data column data format, metadata data column security level, ID of the data table to which the metadata data column belongs, data source type to which the metadata data column belongs, data source ID to which the metadata data column belongs, and other information.

[0034] S3. Call the custom type RestAPI of the Apache Atlas service to create the above type.

[0035] The calling method is POST, and the corresponding parameters are passed in to create the corresponding type. If successful, a success flag is returned and the type format after successful creation is returned. If unsuccessful, follow the above steps to troubleshoot and correct it and try again.

[0036] Data is saved in layers based on the custom Atlas type. Different metadata information, such as database metadata information, data table metadata information, and data column metadata information, will be saved at different levels. When saving the database type, the database metadata information and the distinguishing information column need to be saved. When saving the data table type, the corresponding database metadata information, its own data table metadata information, and the distinguishing information column need to be saved. When saving the data column type, the corresponding database metadata information, its corresponding data table metadata information, its own data column metadata information, and the distinguishing information column need to be saved.

[0037] S4. Call the REST API of the Apache atlas service to save data to save the metadata information of the database, the metadata information of the data table, and the metadata information of the data column.

[0038] Different metadata information such as database metadata information, data table metadata information, and data column metadata information will be saved separately according to different levels when saving, further including that when the database type is saved, the database metadata information and the distinguishing information column need to be saved, when the data table type is saved, its corresponding database metadata information, its own data table metadata information and the distinguishing information column need to be saved, and when the data column type is saved, its corresponding database metadata information, its corresponding data table metadata information, its own data column metadata information and the distinguishing information column need to be saved.

[0039] According to the query conditions passed in, a query statement suitable for the above-mentioned custom Atlas type is assembled for query. For example, when searching for subordinate metadata table information based on metadata database information, the metadata database information can be used as the passed-in parameter and the distinguishing information column as the search target type (data table type, the corresponding constant value is "table") to implement joint search query to the target data set.

[0040] S5. Call the corresponding REST API to write the metadata content of the database, schema, data table, and data column collected in the above steps into the defined database, schema, data table, and data column Type and entity respectively.

[0041] The corresponding metadata contents are written into Atlas. Atlas uses janusgraph graph data as the storage engine, Hbase as the storage medium, and Solr service or ElasticSearch as the retrieval engine. It can add, delete, modify, and query various metadata information.

[0042] S6. Call the data query REST API of the Apache atlas service, insert the corresponding joint search parameters to perform search and query, and then return the result data.

[0043] According to the query conditions passed in, a query statement suitable for the above-mentioned custom Atlas type is assembled for query. For example, when searching for subordinate metadata table information based on metadata database information, the metadata database information can be used as the passed-in parameter and the distinguishing information column as the search target type (data table type, the corresponding constant value is "table") to implement joint search query to the target data set.

[0044] The embodiments described above are only preferred specific implementations of the present invention. Common changes and substitutions made by those skilled in the art within the scope of the technical solution of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for implementing multidimensional metadata joint query based on Atlas, characterized by: The method creates a custom Atlas type, performs classification storage according to the custom Atlas type, and performs classification query and joint retrieval according to the classified stored content, including the following steps: S1. Deploy Atlas services under the Hadoop ecosystem and the basic services that Atlas depends on, including the service registration center Zookeeper, the permission management service Ranger, the distributed file storage system HDFS, the distributed column database Hbase, and the graph database janusgraph; S2. Write custom type information, including but not limited to metadata ID, metadata name, metadata type, metadata creation time, metadata modification time, metadata creation user, and database metadata can extend metadata database name, metadata database type, and metadata database address information; S3. Call the custom type RestAPI of the Apache atlas service to create the above type. The calling method is POST. Enter the corresponding parameters to create the corresponding type format. If successful, return a success flag and the type format after successful creation. If unsuccessful, check and correct it before trying again. S4, calling the REST API of the Apache atlas service to save data to save the metadata information of the database, the metadata information of the data table, and the metadata information of the data column. Different metadata information such as the database metadata information, the data table metadata information, and the data column metadata information will be saved at different levels when saving; S5. Call the corresponding REST API to write the metadata contents of the database, schema, data table, and data column collected in the above steps into the defined database, schema, data table, and data column Type and entity, respectively, and write the corresponding metadata contents into Atlas. The janusgraph graph data used at the bottom of Atlas is used as the storage engine, Hbase is used as the storage medium, and Solr service or ElasticSearch is used as the retrieval engine to add, delete, modify, and query various metadata information; S6. Call the data query REST API of the Apache Atlas service, insert the corresponding joint search parameters to perform the search and return the result data, and assemble the query statement suitable for the custom Atlas type according to the passed-in query conditions to perform the query.

2. The method for realizing multidimensional metadata joint query based on Atlas according to claim 1, characterized in that: The data table metadata can be extended with the metadata data table name, metadata data table Chinese name, metadata data table description, metadata data table security level, metadata data table database ID, metadata data table database type, metadata data table data source ID, metadata data table database type, metadata data table data source ID, metadata data table version information, metadata data table label value, and whether the metadata data table is the main annotation information.

3. The method for realizing multidimensional metadata joint query based on Atlas according to claim 2 is characterized in that: The data column metadata can be extended with the metadata data column name, metadata data column Chinese name, metadata data column description, metadata data column length, metadata data column precision, metadata data column type, model standard ID mounted on the metadata data column, data dictionary ID mounted on the metadata data column, metadata data column data format, metadata data column security level, ID of the data table to which the metadata data column belongs, data source type to which the metadata data column belongs, and data source ID information to which the metadata data column belongs.

Citation Information

Patent Citations

  • Content metadata storing, inquiring method and managing system in content delivery network (CDN)

    CN101741731A

  • Registering, storing, managing and applying system of SOA for web services

    CN101763428A