Background technology
In the data warehouse field, metadata is defined as: the data of data of description and environment thereof.In general, it has the purposes of two aspects.At first, metadata can provide the information based on the user, can help the user to use data as the metadata of the business description information of record data items.Secondly, metadata can back-up system to the administering and maintaining of data, as can back-up system about the metadata of store data items method with effective and efficient manner visit data.Specifically, in data warehouse, the following five type systematic management functions of the main support of metadata mechanism: which data (1) describes in data warehouse; (2) define the data that will enter the data in the data warehouse and from data warehouse, produce; (3) writing down the data pick-up working time of thereupon carrying out according to the business event generation arranges; (4) requirement and the implementation status of record and detection system data consistency; (5) weigh the quality of data.
Existing routine data warehouse metadata schema (Common WarehouseMetamodel in the prior art, be called for short CWM) the international standard theory, but, CWM can not realize between whole systems or intrasystem metadata is obtained, and there is big technical difficulty in existing metadata acquisition methods, is difficult for realizing.Simultaneously, utilize CWM can only be afterwards production information to be integrated and provide the metadata Back ground Information, and because information is difficult to consolidation or postpones omit, can't not realize that because of imperfect and progress catch up with metadata manages accurately easily.
Therefore, provide a kind of can obtaining automatically to concern between the production system data that getting the maintenance of solution metadata develops the metadata management method of asynchronous problem and the technical matters that system becomes urgent need solution in the prior art with production.
Summary of the invention
First purpose of the present invention is, safeguard, content information inconsistent defective asynchronous at metadata information in the prior art, the metadata management method that a kind of metadata information is synchronous with the online production data message and content information is consistent is provided with the actual production data.
Second purpose of the present invention is, safeguard, content information inconsistent defective asynchronous at metadata information in the prior art, the metadata management system that a kind of metadata information is synchronous with the online production data message and content information is consistent is provided with the actual production data.
According to first purpose of the present invention, a kind of metadata management method is provided, comprise A, extract and develop the code that forms according to existing metadata in the metadatabase; The mapping relations information of B, resolving code generates new metadata; C, with new metadata store in metadatabase.
According to second purpose of the present invention, a kind of metadata management system is provided, comprising: the performance analysis device is used for storing according to the existing metadata of metadatabase and develops the code that the back forms; Resolver is used to extract described code, resolves the mapping relations information of described code, generates new metadata; Metadatabase is used to store described metadata.
Among the present invention, the code that the performance analysis device generates is a SQL statement.
Metadata management method of the present invention and management system, by when writing the development data handling procedure to performance history in the parsing of code, extract metadata, can be so that metadata information be safeguarded and the actual production data can be in time synchronous, the content information unanimity, the manual maintenance workload of metadata reduces; Improve metadata simultaneously and provide effect and value with producing to combine; And help quality management, flow monitoring and maintenance management in the demand performance history.
Embodiment
The present invention is described in detail below in conjunction with accompanying drawing.
As shown in Figure 1, the metadata management system of the embodiment of the invention comprises: performance analysis device 20 is used for storing according to the existing metadata of metadatabase and develops the code that the back forms; Resolver 40 is used to extract described code, resolves the mapping relations information of described code, generates new metadata; Metadatabase 60 is used to store described metadata.In the present embodiment, the code that the performance analysis device generates is a SQL statement.
As shown in Figure 2, resolver 40 comprises: analysis module 42 is used to resolve the mapping relations information of SQL statement; Metadata generation module 44 is used for generating corresponding new metadata according to described mapping relations information.Analysis module 42 comprises: field analysis module and/or table level are analyzed a module, and the field analysis submodule is used to resolve the mapping relations between the field of SQL statement; The table level is analyzed submodule, is used to resolve the source table of SQL statement and the mapping relations between the object table.
SQL statement in 40 pairs of performance historyes of resolver is analyzed, set up table level and field mappings relation, generate corresponding metadata information and be stored in metadatabase, performance analysis device 20 is published on corresponding environment and the operation module by will produce the configuration key element to the issue of metadata, make that the metadata information maintenance can be in time synchronous with the actual production data, the content information unanimity, the manual maintenance workload of metadata reduces.
As shown in Figure 3, the metadata management system management method of the embodiment of the invention comprises:
A, extraction are developed the code that forms according to existing metadata in the metadatabase;
The mapping relations information of B, resolving code generates new metadata;
C, with new metadata store in metadatabase.
In the present embodiment, this code is a SQL statement.Wherein, step B specifically comprises: step b12, resolve the table level mapping relations information of described SQL statement; Step b14 sets up mapping relations between source table and the object table according to described table level mapping relations information, generates corresponding new metadata.Above-mentioned table level mapping relations are meant the mapping relations between source table and the object table, and the source table is the basic data set that object table forms, and the source table generates object table by certain field mappings, rule condition, transformation rule etc. according to certain SQL disposal route.
Step B also comprises: step b22, the field mappings relation information of parsing SQL statement; Step b24 sets up mapping relations between the field according to the field mappings relation information, generates corresponding new metadata.
In the present embodiment, resolver 40 can be Structured Query Language (SQL) (Structured QueryLanguage is called for short SQL) resolver.
The concrete operational process of SQL resolver is as follows in the present embodiment:
(1) as shown in Figure 4, input SQL statement;
(2) as shown in Figure 5, set up mutually deserved grammar database;
(3) as shown in Figure 6, the output result can select output table level relation or field level relation.
By the SQL resolver, as long as there is the place of SQL statement just can resolve the output field map information.Obtain the SQL statement of operation system every day, every month, with these SQL statement by the SQL resolver resolves complete after, just can set up the mapping relations of comprehensive table grade and/or field.The SQL resolver be can call in the process of program development or when reaching the standard grade and new procedures, newly-built table etc. and the table of storage or the relation of program built.For the SQL program, transform the original public function of carrying out SQL statement, make it when carrying out SQL statement, write down normalized more detailed logging simultaneously, resolve according to the SQL statement in the daily record again.
When setting up the demand development management, on the demand development platform, finish program development simultaneously by setting up SQL statement, to set up concerning between each table in the metadata automatically by the SQL resolver, when finishing etc. development process, relation is also just set up automatically between table.Solved the problem that original Mr. metadata management safeguards postpartum.An and unified demand development platform that also offers business personnel and the common maintenance and management of developer.
As shown in Figure 7, embodiment of the invention metadata management system is in concrete application process, obtain exploitation code from the development management platform, resolve back generator data storage in metadatabase, by issuing these metadata, can be published on corresponding environment and the operation module producing the configuration key element, make that the metadata information maintenance can be in time synchronous with the actual production data, the content information unanimity, the manual maintenance workload of metadata reduces.Wherein, the development management platform is a business platform, adopts the management of plug-in type, only the plug-in unit of functions of modules need be configured, and just can make development platform have function corresponding.
In the present embodiment, shown in the whole performance history table specific as follows:
In the demand performance history, can instruct, retrain the developer and how on existing metadata basis, constantly, reasonably create new metadata; Workflow control has guaranteed the standardization of performance history; Various developing instruments make the developer develop easily, guarantee the efficient and the quality of metadata output; By the issue means that provide will develop the output metadata be published to test environment, production environment finish test, on line process; By calculating assessment to the workload of the metadata type correspondence of output, make the development amount assess that more science is accurate, optimize and the cooperating of developer, communication, excitation, guiding.
Metadata management method of the present invention and management system can be so that metadata information be safeguarded and the actual production data can be in time synchronous, the content information unanimity, and the manual maintenance workload of metadata reduces; Improve metadata simultaneously and provide effect and value with producing to combine; And help quality management, flow monitoring and maintenance management in the demand performance history.
It should be noted that: above embodiment is only unrestricted in order to explanation the present invention, and the present invention also is not limited in above-mentioned giving an example, and all do not break away from the technical scheme and the improvement thereof of the spirit and scope of the present invention, and it all should be encompassed in the claim scope of the present invention.