WO2019132689A1 - Automated software code generation for a corporate data warehouse - Google Patents
Automated software code generation for a corporate data warehouse Download PDFInfo
- Publication number
- WO2019132689A1 WO2019132689A1 PCT/RU2017/000981 RU2017000981W WO2019132689A1 WO 2019132689 A1 WO2019132689 A1 WO 2019132689A1 RU 2017000981 W RU2017000981 W RU 2017000981W WO 2019132689 A1 WO2019132689 A1 WO 2019132689A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- data
- metadata
- marts
- update
- detailed
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
Definitions
- This technical solution in general, relates to the field of computer technology, and in particular to systems and methods for the automatic generation of software code for an enterprise data warehouse.
- Analytical data warehouses are now becoming a necessary attribute for corporations working with large amounts of data, and are used to identify and create new financial instruments, maintain existing ones, monitor and identify accounting problems, create new and correct existing financial strategies.
- This invention only works online in response to user commands, which requires some effort and affects the speed of work. Moreover, this invention provides only executable code, which significantly reduces the possibilities of a technical solution and does not provide scripts or metadata, on the basis of which in runtime this metadata will determine the execution script.
- a technical problem (or technical problem) in this technical solution is the implementation of automatic generation of program code for the corporate data warehouse.
- An additional technical result is an increase in the efficiency of the data warehouse and a reduction in the time taken to perform typical operations for analysts through the use of metadata and data update templates.
- Metadata are stored in relational database tables.
- metadata is a description of the structure of tables, the relationships between them, partitioning rules, a description of data marts.
- the implementation of the metadata is constant and calculated.
- Metadata are placed in the form of a column-based structure of objects and their primary keys in a database.
- the data update pattern is described in the 82T file.
- a work log is obtained that includes all input macro variables, as well as a trace file.
- the metadata for updating the detailed layer and data marts are reused by making delta changes to the S2T file.
- the reuse of the metadata of the update of the detailed layer and the data marts is performed by switching the basic update patterns.
- Figure 1 shows an exemplary implementation of a method for automatically generating program code for an enterprise data storage
- FIG. Figure 2 shows the architecture of the storage area of the corporate storage database
- FIG. 3 schematically shows the logical structure and ETL-processes of building a single semantic layer
- FIG. 4 shows a scheme for calculating surrogate keys
- FIG. Figure 5 shows the complete path for automatic code generation.
- This technical solution can be implemented on a computer, in the form of an automated system (AS) or computer-readable media containing instructions for performing the above method.
- AS automated system
- a system means a computer system, a computer (electronic computer), a CNC (numerical control), a PLC (programmable logic controller), computerized control systems and any other devices capable of performing a given, well-defined computational sequence operations (actions, instructions).
- a command processing device is an electronic unit or an integrated circuit (microprocessor) that executes machine instructions (programs).
- the command processing device reads and executes machine instructions (programs) from one or more data storage devices.
- a storage device can act, but not limited to, hard drives (HDD), flash memory, ROM (read-only memory), solid-state drives (SSD), optical drives.
- Program - a sequence of instructions intended for execution by a computer control device or command processing device.
- ETL from the English. Extract, Transform, Load - “extract, transform, load”) is one of the main processes in managing data warehouses, which includes: extracting data from external sources; transforming and refining them to fit the needs of the business model; and loading them into the data warehouse.
- S2T is an Excel format file containing information about all data transformations of a subject area that is subject to ETL development.
- Surrogate keys are a set of metadata that defines the rules for creating primary keys of a data warehouse, as well as rules for converting from natural keys of source data to primary keys of a warehouse.
- a natural key is a set of attributes of an entity described by a record that uniquely identifies it (for example, the passport number for a person).
- the detailed layer is a set of tables of a specific physical area of the data warehouse, which is the final layer for ETL processes and which contain all the business data of the data domain storage.
- Metadata - service information of the solution describing the settings of the mechanisms and the results of the work of the data integration subsystems, the data warehouse and the analytical application (for example, information about downloaded files).
- the ETL framework is server-based software that manages and loads data from external systems into the data warehouse.
- the semantic layer is a set of physical and virtual data marts that provide the data of the FSLDM model in a transformed form in accordance with the purpose of a particular storefront.
- Data Showcase (Data Mart; other translation options: specialized data storage, data kiosk, data market) —a data storage slice, which is an array of thematic, narrowly targeted information, targeted, for example, to users of one working group or department.
- OLAP is a data processing technology consisting in the preparation of summary (aggregated) information based on large data arrays, structured according to a multidimensional principle. Implementations of OLAP technology are components of software solutions of the Business Intelligence class.
- a method for automatically generating program code for an enterprise data warehouse shown in FIG. 1, is as follows.
- Step 101 receive metadata describing the configuration of data transformation mechanisms for loading them to the detailed layer level and calculating data mart storefronts;
- Metadata is an important part of the data warehouse architecture 200. Metadata is data that describes the rules by which the store operates. For example, from the point of view of a warehouse database, metadata is a description of table structures, relationships between them, partitioning rules, description of data marts, etc. From the point of view of ETL, metadata are descriptions of the rules for extracting and transforming data, the frequency of execution of ETL processes, etc.
- the implementation of the metadata of corporate vault 200 includes:
- metadata management is performed by separate tools for each of the storage components.
- this tool is the Oracle Enterprise Manager.
- the implementation of the metadata can be stored in special PostgreSQL tables.
- Attributes can be used as metadata, which are parameters that allow managing the ETL process.
- the implementation of the metadata, and accordingly the attributes can be constant and calculated.
- the values of constant attributes do not depend on the results. previous data downloads to the repository.
- Calculated attributes are variable values depending on the results of previous ETL downloads.
- Attribute values can be entered into ETL structures through a web interface.
- Such attributes can be the loading mode (for example, archive, incremental), the version of the loading specification, the sequence number of the incremental loading, the lower limit of the upload for each loaded entity, etc.
- statistics can be used that are values stored during an ETL process that can be used to calculate calculated attributes in subsequent processes.
- Statistics values can be stored in tables by means of relational database stored procedures.
- relational DBMS can be used such as MySQL, PostgreSQL or Oracle, without being limited to.
- the metadata is placed in the form of column structure of objects and their primary keys in the database.
- This data can be presented either in the form of a tabular presentation and / or in the form of Excel spreadsheets, and / or in any relational database.
- Metadata is obtained from primary external data systems 230 and loaded into temporary storage area 210 (FIG. 2).
- the temporary storage area 210 is an intermediate layer between external data sources and a persistent storage area in which a detailed layer and data marts are located.
- the data extracted from external data sources DBMS, csv, dbf, xml files, web services, etc.
- DBMS external data sources
- csv, dbf, xml files, web services, etc. are saved, data is cleared, transformed, enriched, and prepared for loading into the permanent storage area 220.
- the next cycle of processing and loading data into the repository cannot be started until all the necessary data from various external data sources are retrieved, and for a number of reasons (geographic distribution, different system operation cycles, etc.), the data in the sources can be available at different points in time.
- the temporary storage area 210 serves to collect all the necessary data before starting the transformation.
- Step 102 forming at least one pattern of updating the data of the detailed layer and data marts of the data storage;
- the detailed layer is the main corporate data warehouse. Transformed and cleaned detailed data from external systems 230 and data sources, and basic classifiers are stored in this area. This area contains the following types of entities: reference books and classifiers; entities containing actual values; entities describing relationships.
- Reference books and classifiers can determine the following information:
- Entities containing actual values are transactional data from external systems 230 and data sources. For example, information about customer payments made, invoices, transactions, etc.
- Entities containing relationships define relationships between all other entities.
- the connection may be the following: client-service-bank.
- Data marts are objects of storing analytical information aimed at supporting specific business functions, specific company divisions. At the database level, storefronts are usually implemented in a star or snowflake pattern and contain data from the detailed layer area. Also, data marts can be implemented as a multidimensional OLAP cube. Data marts are the basis for multidimensional analysis (OLAP) data. In the corporate data warehouse 200, the detailed layer and data marts are located in the permanent data storage area 220 (FIG. 2).
- the data update pattern is a SQL procedure template.
- This technical solution uses the strategy of updating the detailed layer data and data marts, which is a way to write the initial data set in the detailed layer table format to the detailed layer table, which solves the problem of building a history.
- the data update pattern (layer N layer T) is completely standard, and can be described in a 52T file by specifying the name of the update strategy and its parameters as a data update template.
- the data refresh strategy “data snapshot - data snapshot” works as follows. Non-historical data from the data source is transferred to non-historical tables in the detailed data storage layer.
- This data update template can be used for surrogate key containers (contracts, clients, etc.), as well as for transactional data (financial transactions, transactions, etc.). If the source fields used to calculate the primary key of the detailed layer can be overwritten on the source, then they support emulation of the replication mode. Replication is a process that means copying data from one source to another (or to many others) and vice versa.
- this data update template can work with data accumulation and without data accumulation.
- the data refresh strategy “data snapshot - data history” works as follows. Data for which no change history is maintained at the source is stored in a detailed layer of a permanent data warehouse with history creation. At the same time, the history for later periods is removed from the detailed layer than the one that came in the current update package. If the fields source used to calculate the primary key of the detailed layer can be overwritten on the source, then support replication mode emulation.
- the strategy of updating data “data history - data history” works as follows. Performs full replication of the data history, which is maintained at the source with reference to the date / time of an attribute value change (or linked to date periods - dates / start and end dates), to the detailed data storage layer. At the same time, to exclude problems with updating the "date of relevance" field at the source, support replication mode emulation. When loading source datasets with a history for the date, gaps in the history of the detailed layer are not allowed. No intersection in the history of the detailed layer is allowed; an earlier period of two intersecting ones is subject to truncation.
- a history for a certain period can also be loaded with a “snapshot-snapshot” template, if there is no need to eliminate the intersection of historical periods. For this, it is necessary to provide emulation of the replication mode; the key should include both the fields on the basis of which the primary key is calculated in the detailed layer and the fields containing the beginning and end of the relevance period.
- the formation of a surrogate key can be carried out by keeping and mapping the initial sets of natural keys to a sequence of integer values or, as shown in FIG. 4, can be determined based on the value of the unique key of an entity using the following formula:
- the surrogate keys obtained according to this scheme can be in the form of a 160-bit hexadecimal code. In the future, such keys are conveniently used to bind non-unified entities.
- an Apache view is used.
- Hive for calculating surrogate key values.
- Hive is an engine that turns SQL queries into chains of map-reduce tasks.
- the engine includes components such as Parser (parses incoming SQL queries), Optimizer (optimizes the query for greater efficiency), Planner (schedules tasks for execution), Executor (3a starts tasks on the MapReduce framework.
- Hive also requires a metadata repository. SQL assumes work with such objects as a database, a table, columns, lines, cells, etc. Since the data itself that Hive uses is simply stored as files in hdfs — it is necessary to store somewhere the correspondence between the Hive objects and the actual files.
- Step 103 generate program code for loading data into the detailed storage layer and calculating data marts based on the received metadata and the generated data update template;
- FIG. 5 shows the process of automatic generation of software code, which consists of the following steps.
- each template results in directly generated working program code. Additionally, as a result of the template operation, a work log is received, which includes all input macro variables, as well as a trace file (trace file), which can contain all values of variables, used data structures and arrays (collections).
- trace file trace file
- Each transformation can contain either the name or symbol of the templates used.
- the input data for the procedure template can be: scalar variables, vector elements (arrays, lists, hash tables), as well as multidimensional elements (vector vectors).
- the elements can be either the simplest elements or complex objects (objects based on the developed Java classes).
- Step 104 automatically install the program code generated in the previous step onto the data warehouse environment to perform the downloads;
- a patch is created that contains the generated program code in the format and structure of the standards-compliant release-configuration management, which is installed on the development environment in run-time mode.
- the patch can also include a patch installation script with instructions for the admin console.
- the patch ready to be installed on the corporate data warehouse development environment, is compatible with the system of automatic distribution of patches to the stands.
- the objects, databases that are included in the patch are installed on the development environment in the same manner. If errors occur, they are in the event log and visible to the user.
- the set of event logs contains a detailed analysis of possible errors and warnings. Objects of the same type are grouped in directories by data types and are located inside the suffixes of the database names and their subsequent location.
- Table 1 below shows a typical patch structure. Particular attention should be paid to the SetupManual_000000.txt, in which a sequence of steps is automatically created for installing the patch (distribution) on all environments.
- Step 105 reuse the detailed layer update metadata and data marts.
- the first approach is to make changes to the existing S2T file (structure) and re-create the entire patch, that is, implement a new patch (cumulative patch). After this, changes can be highlighted by the version control system (git) used to maintain the code.
- git version control system
- the second option is to perform automatic marking in the S2T tabs of the modified transformations and then only they will be included in the patch.
- the patch interface should be marked as incremental in the interface.
- aspects of the present invention may also be implemented using a data processing device that is a computing machine or system (or tools such as a central / graphics processor or microprocessor) that reads and executes a program stored in memory to perform the functions described above.
- a data processing device that is a computing machine or system (or tools such as a central / graphics processor or microprocessor) that reads and executes a program stored in memory to perform the functions described above.
- the embodiment (s) and the method shown in FIG. 1 the steps of which are performed by a computing machine or device by, for example, reading and executing a program recorded on a memory device in order to perform the functions of the embodiment described above (s).
- the program is recorded on a computer, for example, via a network or from a medium for recording various types, serving as a storage device (for example, a computer-readable medium).
- the data processing device may have additional features or functionality.
- a data processing device may also include additional data storage devices (removable and non-removable), such as, for example, magnetic disks, optical disks, or tape.
- Storage devices can include volatile and nonvolatile, removable and non-removable media implemented in any method or using any technology for storing information, such as computer-readable instructions, data structures, program modules or other data.
- Storage device, removable storage and non-removable storage are examples of computer storage media.
- Computer storage media includes, but is not in a limiting sense, random access memory (RAM), read-only memory (ROM), electrically erasable programmable ROM (EEPROM), flash memory or memory made using a different technology, ROM on a CD disk (CD-ROM), digital versatile disks (DVDs) or other optical storage devices, magnetic cassettes, magnetic tapes, storages on magnetic disks or other magnetic storage devices, or any other medium that can be used on to store the desired information and which the data processing device can access.
- the processing unit may also include input device (s) such as keyboard, mouse, pen, voice input device, touch input device, and so on.
- An output device (s) such as a display, speakers, a printer, and the like may also be included in the system.
- the data processing device contains communication connections that allow the device to communicate with other computing devices, such as over a network.
- Networks include local area networks and global networks along with other large scalable networks, including but not limited to corporate networks and extranets.
- a communication connection is an example of a communication environment.
- the communication medium may be implemented using computer-readable instructions, data structures, program modules or other data in a modulated information signal, such as a carrier wave, or in another transport mechanism, and includes any information delivery medium.
- modulated information signal means a signal that has one or more of its characteristics changed or set to encode information in this signal.
- communication media includes wired environments such as a wired network or direct-wired connection, and wireless environments such as acoustic, radio frequency, infrared, and other wireless environments.
- computer readable medium includes both data carriers and communication media.
- a program may be pre-recorded onto a recording medium, such as a hard disk, or a ROM (Read Only Memory).
- the program may be temporarily or permanently stored (recorded) on a removable recording medium, such as a floppy disk, CD-ROM (CD for playback only), MO (magneto-optical) disk, DVD (digital versatile disk), magnetic disk or semiconductor memory.
- Removable recording media can be distributed in the form of so-called, sold through a retail network software.
- the program can be installed from a removable recording medium, described above, on a computer, or it can be transferred by cable from a download site to a computer, or it can be transferred to a computer via network data transmission channels, such as a LAN (local area network) or The Internet.
- a computer can receive a program transmitted in this way and can install it on a recording medium, such as an internal hard disk.
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
Description
АВТОМАТИЧЕСКАЯ ГЕНЕРАЦИЯ ПРОГРАММНОГО КОДА ДЛЯ КОРПОРАТИВНОГО AUTOMATIC GENERATION OF PROGRAM CODE FOR CORPORATE
ХРАНИЛИЩА ДАННЫХ DATA STORAGE
ОБЛАСТЬ ТЕХНИКИ TECHNICAL FIELD
[1] Данное техническое решение, в общем, относится к области вычислительной техники, а в частности к системам и способам автоматической генерации программного кода для корпоративного хранилища данных. [1] This technical solution, in general, relates to the field of computer technology, and in particular to systems and methods for the automatic generation of software code for an enterprise data warehouse.
УРОВЕНЬ ТЕХНИКИ BACKGROUND
[2] Аналитические хранилища данных в настоящее время становятся необходимым атрибутом для корпораций, работающих с большими объемами данных, и служат для выявления и создания новых финансовых инструментов, сопровождения имеющихся, контроля и выявлений проблем учета, создания новых и коррекции работающих финансовых стратегий. [2] Analytical data warehouses are now becoming a necessary attribute for corporations working with large amounts of data, and are used to identify and create new financial instruments, maintain existing ones, monitor and identify accounting problems, create new and correct existing financial strategies.
[3] Источником данных для таких систем практически всегда являются разнородные системы, обслуживающие как фронт-офисные системы, представляющие лицо корпорации перед клиентами, так и бэк-офисные приложения, осуществляющие финансовый учет. Кроме того очень часто хранилища также хранят и мидл-офисные данные для анализа своей работы. Таким образом, источником данных для корпоративного хранилища являются сотни систем, постоянно меняющиеся в соответствии с требованиями развития бизнеса. [3] The data source for such systems is almost always heterogeneous systems, serving both front-office systems, representing the corporation's face to customers, and back-office applications that perform financial accounting. In addition, very often the vaults also store middle-office data for analyzing their work. Thus, the source of data for the corporate repository are hundreds of systems that are constantly changing in accordance with the requirements of business development.
[4] В таких условиях создание четкой однотипной системы для сбора данных в единой модели является необходимым требованием для получений актуальных и достоверных данных, поступающих из исходных систем. [4] In such conditions, the creation of a clear one-type system for collecting data in a single model is a necessary requirement for obtaining relevant and reliable data coming from source systems.
[5] Из уровня техники известен патент Ns US6604110B1 «Automated software code generation from a metadata-based repository», патентообладатель: International Business Machines Corp, дата публикации: 31.10.2000. В данном техническом решении раскрывается способ предоставления исполняемого программного кода для использования в приложении управления модели данных предприятия (EDM), который передает данные из одного или нескольких источников данных в базу данных приложений EDM, для использования в них в ответ на пользовательские команды. [5] From the state of the art, patent Ns US6604110B1 "Automated software of the metadata-based repository" patent, patent holder: International Business Machines Corp, publication date: 10/31/2000, is known. This technical solution discloses a method for providing executable program code for use in an enterprise data management model (EDM) application that transfers data from one or more data sources to an EDM application database for use in response to user commands.
[6] Данное изобретение работает только в интерактивном режиме в ответ на команды пользователя, что требует определенных трудозатрат и влияет на скорость работы. Более того, данное изобретение предоставляет только исполняемый код, что значительно сужает возможности технического решения и не предоставляет сценарии или метаданные, на основании которых в режиме исполнения эти метаданные будут определять сценарий выполнения. [6] This invention only works online in response to user commands, which requires some effort and affects the speed of work. Moreover, this invention provides only executable code, which significantly reduces the possibilities of a technical solution and does not provide scripts or metadata, on the basis of which in runtime this metadata will determine the execution script.
СУЩНОСТЬ ИЗОБРЕТЕНИЯ SUMMARY OF INVENTION
[7] Данное техническое решение направлено на устранение недостатков, присущих существующим решениям, известным из уровня техники. [7] This technical solution is aimed at eliminating the shortcomings inherent in existing solutions, known from the prior art.
[8] Технической проблемой (или технической задачей) в данном техническом решении является осуществление автоматической генерации программного кода для корпоративного хранилища данных. [8] A technical problem (or technical problem) in this technical solution is the implementation of automatic generation of program code for the corporate data warehouse.
[9] Техническим результатом, проявляющимся при решении вышеуказанной технической проблемы, является повышение стабильности работы алгоритмов детального слоя и витрин данных, а также уменьшение количества инцидентов в хранилище данных. [9] The technical result, which appears when solving the above technical problem, is an increase in the stability of the algorithms of the detailed layer and data marts, as well as a decrease in the number of incidents in the data warehouse.
[10] Дополнительным техническим результатом является повышение эффективности работы хранилища данных и сокращение времени на выполнение типовых операций для аналитиков за счет использования метаданных и шаблонов обновления данных. [10] An additional technical result is an increase in the efficiency of the data warehouse and a reduction in the time taken to perform typical operations for analysts through the use of metadata and data update templates.
[11] Дополнительно повышается скорость мигрирования данных на другую платформу за счет переиспользования метаданных и шаблонов данных. [11] Additionally, the speed of data migration to another platform is enhanced by reusing metadata and data templates.
[12] Указанный технический результат достигается благодаря осуществлению способа автоматической генерации программного кода для корпоративного хранилища данных, в котором получают метаданные, описывающие настройку механизмов трансформации данных для их загрузки на уровень детального слоя и расчета витрин хранилища данных; формируют по меньшей мере один шаблон обновления данных детального слоя и витрины данных хранилища данных; осуществляют генерацию программного кода для загрузки данных в детальный слой хранилища и расчета витрин данных на основе полученных метаданных и сформированного шаблона обновления данных; устанавливают сгенерированный на предыдущем шаге программный код на среду хранилища данных для выполнения загрузок; осуществляют переиспользование метаданных обновления детального слоя и витрин данных. [12] This technical result is achieved due to the implementation of the method of automatic generation of program code for the corporate data warehouse, in which metadata are obtained that describe the setting of the data transformation mechanisms for loading them to the detailed layer level and calculating the data mart storefronts; form at least one template update data detailed layer and data marts data storage; carry out the generation of software code for loading data into the detailed storage layer and calculating data marts based on the received metadata and the generated data update template; install the program code generated in the previous step to the data storage environment for downloading; reuse of metadata update detailed layer and data marts.
[13] В некоторых вариантах осуществления метаданные хранятся в таблицах реляционной базы данных. [14] В некоторых вариантах осуществления метаданными являются описание структур таблиц, взаимосвязей между ними, правил секционирования, описание витрин данных. [13] In some embodiments, metadata are stored in relational database tables. [14] In some embodiments, metadata is a description of the structure of tables, the relationships between them, partitioning rules, a description of data marts.
[15] В некоторых вариантах осуществления метаданные являются константными и расчетными. [15] In some embodiments, the implementation of the metadata is constant and calculated.
[16] В некоторых вариантах осуществления метаданные размещаются в форме поколоночной структуры объектов и их первичных ключей в базе данных. [16] In some embodiments, metadata are placed in the form of a column-based structure of objects and their primary keys in a database.
[17] В некоторых вариантах осуществления шаблон обновления данных описан в 82Т-файле. [17] In some embodiments, the data update pattern is described in the 82T file.
[18] В некоторых вариантах осуществления дополнительно при осуществлении генерации программного кода получают лог работы, который включает все входные макропеременные, а также трассировочный файл. [18] In some embodiments, additionally, when generating program code, a work log is obtained that includes all input macro variables, as well as a trace file.
[19] В некоторых вариантах осуществления осуществляют пере использование метаданных обновления детального слоя и витрин данных за счет внесения дельты изменений в S2T файл. [19] In some embodiments, the metadata for updating the detailed layer and data marts are reused by making delta changes to the S2T file.
[20] В некоторых вариантах осуществления переиспользование метаданных обновления детального слоя и витрин данных осуществляют путем переключения базовых шаблонов обновления. [20] In some embodiments, the reuse of the metadata of the update of the detailed layer and the data marts is performed by switching the basic update patterns.
КРАТКОЕ ОПИСАНИЕ ЧЕРТЕЖЕЙ BRIEF DESCRIPTION OF THE DRAWINGS
[21] Признаки и преимущества настоящего изобретения станут очевидными из приводимого ниже подробного описания изобретения и прилагаемых чертежей, на которых: [21] The features and advantages of the present invention will become apparent from the following detailed description of the invention and the accompanying drawings, in which:
[22] На Фиг.1 показан пример осуществления способа автоматической генерации программного кода для корпоративного хранилища данных; [22] Figure 1 shows an exemplary implementation of a method for automatically generating program code for an enterprise data storage;
[23] На Фиг. 2 показана архитектура области хранения данных базы данных корпоративного хранилища; [23] FIG. Figure 2 shows the architecture of the storage area of the corporate storage database;
[24] На Фиг. 3 схематично показана логическая структура и ETL-процессы построения единого семантического слоя; [24] FIG. 3 schematically shows the logical structure and ETL-processes of building a single semantic layer;
[25] На Фиг. 4 показана схема вычисления суррогатных ключей; [25] FIG. 4 shows a scheme for calculating surrogate keys;
[26] На Фиг. 5 показан полный путь автоматической генерации программного кода. [26] FIG. Figure 5 shows the complete path for automatic code generation.
ПОДРОБНОЕ ОПИСАНИЕ ИЗОБРЕТЕНИЯ DETAILED DESCRIPTION OF THE INVENTION
з [27] Данное техническое решение может быть реализовано на компьютере, в виде автоматизированной системы (АС) или машиночитаемого носителя, содержащего инструкции для выполнения вышеупомянутого способа. s [27] This technical solution can be implemented on a computer, in the form of an automated system (AS) or computer-readable media containing instructions for performing the above method.
[28] Техническое решение может быть реализовано в виде распределенной компьютерной системы. [28] The technical solution can be implemented as a distributed computer system.
[29] В данном решении под системой подразумевается компьютерная система, ЭВМ (электронно-вычислительная машина), ЧПУ (числовое программное управление), ПЛК (программируемый логический контроллер), компьютеризированные системы управления и любые другие устройства, способные выполнять заданную, чётко определённую последовательность вычислительных операций (действий, инструкций). [29] In this solution, a system means a computer system, a computer (electronic computer), a CNC (numerical control), a PLC (programmable logic controller), computerized control systems and any other devices capable of performing a given, well-defined computational sequence operations (actions, instructions).
[30] Под устройством обработки команд подразумевается электронный блок либо интегральная схема (микропроцессор), исполняющая машинные инструкции (программы). [30] A command processing device is an electronic unit or an integrated circuit (microprocessor) that executes machine instructions (programs).
[31] Устройство обработки команд считывает и выполняет машинные инструкции (программы) с одного или более устройства хранения данных. В роли устройства хранения данных могут выступать, но, не ограничиваясь, жесткие диски (HDD), флеш-память, ПЗУ (постоянное запоминающее устройство), твердотельные накопители (SSD), оптические приводы. [31] The command processing device reads and executes machine instructions (programs) from one or more data storage devices. In the role of a storage device can act, but not limited to, hard drives (HDD), flash memory, ROM (read-only memory), solid-state drives (SSD), optical drives.
[32] Программа - последовательность инструкций, предназначенных для исполнения устройством управления вычислительной машины или устройством обработки команд. [32] Program - a sequence of instructions intended for execution by a computer control device or command processing device.
[33] Ниже будут описаны термины и понятия, необходимые для осуществления настоящего технического решения. [33] The following will describe the terms and concepts necessary to implement this technical solution.
[34] ETL (от англ. Extract, Transform, Load — «извлечение, преобразование, загрузка»)— один из основных процессов в управлении хранилищами данных, который включает в себя: извлечение данных из внешних источников; их трансформация и очистка, чтобы они соответствовали потребностям бизнес- модели; и загрузка их в хранилище данных. [34] ETL (from the English. Extract, Transform, Load - “extract, transform, load”) is one of the main processes in managing data warehouses, which includes: extracting data from external sources; transforming and refining them to fit the needs of the business model; and loading them into the data warehouse.
[35] S2T - файл формата Excel, содержащий информацию обо всех преобразованиях данных предметной области, которая подлежит ETL разработке. [35] S2T is an Excel format file containing information about all data transformations of a subject area that is subject to ETL development.
[36] Суррогатные ключи - набор метаданных, определяющих правила создания первичных ключей хранилища данных, а также правила преобразования от естественных ключей исходных данных к первичным ключам хранилища. [37] Естественный ключ - набор атрибутов описываемой записью сущности, уникально её идентифицирующий (например, номер паспорта для человека). [36] Surrogate keys are a set of metadata that defines the rules for creating primary keys of a data warehouse, as well as rules for converting from natural keys of source data to primary keys of a warehouse. [37] A natural key is a set of attributes of an entity described by a record that uniquely identifies it (for example, the passport number for a person).
[38] Детальный слой - набор таблиц определенной физической области хранилища данных, который является финальным слоем для ETL процессов и которые содержат все бизнес данные хранилища предметной области. [38] The detailed layer is a set of tables of a specific physical area of the data warehouse, which is the final layer for ETL processes and which contain all the business data of the data domain storage.
[39] Метаданные - служебная информация решения, описывающая настройки механизмов и результаты работы подсистем интеграции данных, хранилища данных и аналитического приложения (например, информация о загруженных файлах). [39] Metadata - service information of the solution, describing the settings of the mechanisms and the results of the work of the data integration subsystems, the data warehouse and the analytical application (for example, information about downloaded files).
[40] Фреймворк ETL - программное обеспечение в серверном исполнении, управляющее и загружающее данные из внешних систем в хранилище данных. [40] The ETL framework is server-based software that manages and loads data from external systems into the data warehouse.
[41] Семантический слой - набор физических и виртуальных витрин данных, предоставляющих данные модели FSLDM в преобразованном виде в соответствии с назначением конкретной витрины. [41] The semantic layer is a set of physical and virtual data marts that provide the data of the FSLDM model in a transformed form in accordance with the purpose of a particular storefront.
[42] Витрина данных (англ. Data Mart; другие варианты перевода: хранилище данных специализированное, киоск данных, рынок данных)— срез хранилища данных, представляющий собой массив тематической, узконаправленной информации, ориентированный, например, на пользователей одной рабочей группы или департамента. [42] Data Showcase (Data Mart; other translation options: specialized data storage, data kiosk, data market) —a data storage slice, which is an array of thematic, narrowly targeted information, targeted, for example, to users of one working group or department.
[43] OLAP — технология обработки данных, заключающаяся в подготовке суммарной (агрегированной) информации на основе больших массивов данных, структурированных по многомерному принципу. Реализации технологии OLAP являются компонентами программных решений класса Business Intelligence. [43] OLAP is a data processing technology consisting in the preparation of summary (aggregated) information based on large data arrays, structured according to a multidimensional principle. Implementations of OLAP technology are components of software solutions of the Business Intelligence class.
[44] Патч (англ patch /paetj/— заплатка)— информация, предназначенная для автоматизированного внесения определённых изменений в компьютерные файлы и базы данных. [44] Patch (English patch / paetj / - patch) - information intended for automated introduction of certain changes in computer files and databases.
[45] Способ автоматической генерации программного кода для корпоративного хранилища данных, показанный на Фиг. 1 , осуществляют следующим образом. [45] A method for automatically generating program code for an enterprise data warehouse shown in FIG. 1, is as follows.
[46] Шаг 101 : получают метаданные, описывающие настройку механизмов трансформации данных для их загрузки на уровень детального слоя и расчета витрин хранилища данных; [46] Step 101: receive metadata describing the configuration of data transformation mechanisms for loading them to the detailed layer level and calculating data mart storefronts;
[47] В корпоративном хранилище данных 200, показанном на Фиг. 2, зафиксирована четкая система этапов загрузки и преобразования данных из внешних автоматизированных систем, сопровождающаяся единым протоколированием выполнения всех этапов, динамическим и статическим распараллеливанием и возможностью восстановления в случае сбоя с любого места загрузки. [47] In the corporate data warehouse 200 shown in FIG. 2, a clear system of stages of loading and converting data from external automated systems was recorded, accompanied by unified logging of all stages, dynamic and static parallelization and the possibility of recovery in case of failure from any download location.
[48] Метаданные являются важной частью архитектуры хранилища данных 200. Метаданные - это данные, описывающие правила, по которым функционирует хранилище. Например, с точки зрения базы данных хранилища, метаданными является описание структур таблиц, взаимосвязей между ними, правил секционирования, описание витрин данных и т.п. С точки зрения ETL, метаданными являются описания правил извлечения и преобразования данных, периодичность выполнения ETL-процессов и т.п. [48] Metadata is an important part of the data warehouse architecture 200. Metadata is data that describes the rules by which the store operates. For example, from the point of view of a warehouse database, metadata is a description of table structures, relationships between them, partitioning rules, description of data marts, etc. From the point of view of ETL, metadata are descriptions of the rules for extracting and transforming data, the frequency of execution of ETL processes, etc.
[49] В некоторых вариантах осуществления метаданные корпоративного хранилища 200 включают: [49] In some embodiments, the implementation of the metadata of corporate vault 200 includes:
• информацию о данных, находящихся в хранилище, их бизнес- описание и структуру хранения; • information about the data stored in the repository, their business description and storage structure;
• описание структур источников данных, как внешних, так и внутренних, их доступности; • a description of the structure of data sources, both external and internal, of their availability;
• информацию о структуре процессов ETL, периодичности их выполнения, применяемых правил очистки и преобразования данных; • information on the structure of the ETL processes, their frequency of execution, the applicable rules for data cleaning and conversion;
• описание представления данных, помогающее пользователю работать с В1-приложением; • a description of the presentation of data that helps the user to work with the B1 application;
• информацию о настройках безопасности, правил аутентификации и назначенных прав доступа; • information about security settings, authentication rules and assigned access rights;
• статистику утилизации ресурсов, обращений к данным и др., которая помогает администратору оптимизировать работу базы данных хранилища. • statistics on the utilization of resources, data accesses, etc., which helps the administrator to optimize the operation of the warehouse database.
[50] В некоторых вариантах осуществления управление метаданными осуществляется отдельными инструментами для каждого из компонентов хранилища. Например, для базы данных Oracle, метаданные которой хранятся в системных таблицах и настроечных файлах, данным инструментом является Oracle Enterprise Manager. [50] In some embodiments, metadata management is performed by separate tools for each of the storage components. For example, for an Oracle database whose metadata is stored in system tables and configuration files, this tool is the Oracle Enterprise Manager.
[51] В некоторых вариантах осуществления метаданные могут храниться в специальных таблицах PostgreSQL. [51] In some embodiments, the implementation of the metadata can be stored in special PostgreSQL tables.
[52] В качестве метаданных могут использоваться атрибуты, которые являются параметрами, позволяющими управлять ETL-процессом. В некоторых вариантах осуществления метаданные, и соответственно атрибуты могут быть константными и расчетными. Значения константных атрибутов не зависят от результатов предыдущих загрузок данных в хранилище. Расчетные атрибуты, являются переменными значениями, зависящими от результатов предыдущих ETL-загрузок. Значения атрибутов могут заноситься в структуры ETL через веб-интерфейс. Такими атрибутами могут быть режим загрузки (например, архивный, инкрементальный), версия спецификации загрузки, порядковый номер инкрементальной загрузки, нижняя граница выгрузки для каждой загружаемой сущности и т.п. [52] Attributes can be used as metadata, which are parameters that allow managing the ETL process. In some embodiments, the implementation of the metadata, and accordingly the attributes can be constant and calculated. The values of constant attributes do not depend on the results. previous data downloads to the repository. Calculated attributes are variable values depending on the results of previous ETL downloads. Attribute values can be entered into ETL structures through a web interface. Such attributes can be the loading mode (for example, archive, incremental), the version of the loading specification, the sequence number of the incremental loading, the lower limit of the upload for each loaded entity, etc.
[53] В качестве метаданных могут использоваться статистики, которые являются сохраняемыми во время ETL-процесса значениями, которые можно использовать для вычисления расчетных атрибутов в последующих процессах. Значения статистик могут сохраняться в таблицах средствами хранимых процедур реляционной базы данных. В качестве реляционной СУБД может использоваться такая как MySQL, PostgreSQL или Oracle, не ограничиваясь. [53] As metadata, statistics can be used that are values stored during an ETL process that can be used to calculate calculated attributes in subsequent processes. Statistics values can be stored in tables by means of relational database stored procedures. As a relational DBMS can be used such as MySQL, PostgreSQL or Oracle, without being limited to.
[54] В некоторых вариантах осуществления изобретения метаданные размещаются в форме поколоночной структуры объектов и их первичных ключей в базе данных. Эти данные могут быть представлены либо в виде табличного представления и/или в виде электронных таблиц Excel, и/или в любой реляционной БД. [54] In some embodiments of the invention, the metadata is placed in the form of column structure of objects and their primary keys in the database. This data can be presented either in the form of a tabular presentation and / or in the form of Excel spreadsheets, and / or in any relational database.
[55] Метаданные получают из первичных внешних систем 230 данных и загружают в область 210 временного хранения данных (Фиг. 2). [55] Metadata is obtained from primary external data systems 230 and loaded into temporary storage area 210 (FIG. 2).
[56] Область 210 временного хранения данных является промежуточным слоем между внешними источниками данных и областью постоянного хранения, в которой находится детальный слой и витрины данных. В данной области сохраняются извлеченные из внешних источников данных (СУБД, csv, dbf, xml файлов, web-сервисов и т.д.) данные, производится их очистка, трансформация, обогащение, подготовка к загрузке в область 220 постоянного хранения. Зачастую очередной цикл обработки и загрузки данных в хранилище не может быть начат пока не будут извлечены все необходимые данные из различных внешних источников данных, а в силу ряда причин (географической распределенности, разных циклов функционирования систем и т.п.) данные в источниках могут быть доступны в разные моменты по времени. Область 210 временного хранения служит для сбора всех необходимых данных перед началом трансформации. [56] The temporary storage area 210 is an intermediate layer between external data sources and a persistent storage area in which a detailed layer and data marts are located. In this area, the data extracted from external data sources (DBMS, csv, dbf, xml files, web services, etc.) are saved, data is cleared, transformed, enriched, and prepared for loading into the permanent storage area 220. Often, the next cycle of processing and loading data into the repository cannot be started until all the necessary data from various external data sources are retrieved, and for a number of reasons (geographic distribution, different system operation cycles, etc.), the data in the sources can be available at different points in time. The temporary storage area 210 serves to collect all the necessary data before starting the transformation.
[57] Шаг 102: формируют, по меньшей мере, один шаблон обновления данных детального слоя и витрины данных хранилища данных; [58] Детальный слой является основной корпоративного хранилища данных. В этой области хранятся преобразованные и очищенные детальные данные, полученные из внешних систем 230 и источников данных, и основные классификаторы. Данная область содержит следующие типы сущностей: справочники и классификаторы; сущности, содержащие фактические значения; сущности, описывающие связи. [57] Step 102: forming at least one pattern of updating the data of the detailed layer and data marts of the data storage; [58] The detailed layer is the main corporate data warehouse. Transformed and cleaned detailed data from external systems 230 and data sources, and basic classifiers are stored in this area. This area contains the following types of entities: reference books and classifiers; entities containing actual values; entities describing relationships.
[59] Справочники и классификаторы могут определять следующую информацию: [59] Reference books and classifiers can determine the following information:
• участников основных бизнес-процессов - клиентов, поставщиков, филиалы, услуги, продукты и т.п.; • participants of the main business processes - customers, suppliers, branches, services, products, etc .;
• базовые справочники - дата и время, валюта, страны и т.п.; • basic reference books - date and time, currency, countries, etc .;
• прочие справочники - отражающие потребности бизнеса в необходимой аналитике данных, определяющие в разрезе каких справочников необходимо анализировать фактические данные. • other directories - reflecting the needs of the business in the necessary data analytics, defining, in terms of which directories, the actual data should be analyzed.
[60] Сущности, содержащие фактические значения, - транзакционные данные из внешних систем 230 и источников данных. Например, информация о совершенных платежах клиентов, выставленных счетах, проводках и т.п. [60] Entities containing actual values are transactional data from external systems 230 and data sources. For example, information about customer payments made, invoices, transactions, etc.
[61] Сущности, содержащие связи, определяют взаимосвязи между всеми остальными сущностями. Например, связь может быть следующей: клиент-услуга- банк. [61] Entities containing relationships define relationships between all other entities. For example, the connection may be the following: client-service-bank.
[62] Витрины данных являются объектами хранения аналитической информации, нацеленными на поддержку конкретных бизнес-функций, конкретных подразделений компании. На уровне базы данных витрины обычно реализуются по схеме «звезда» или «снежинка» и содержат данные из области детального слоя. Также витрины данных могут быть реализованы в виде многомерного OLAP- куба. Витрины данных являются основой, обеспечивающей возможность проведения многомерного анализа (OLAP) данных. В корпоративном хранилище данных 200 детальный слой и витрины данных располагаются в области 220 постоянного хранения данных (Фиг. 2). [62] Data marts are objects of storing analytical information aimed at supporting specific business functions, specific company divisions. At the database level, storefronts are usually implemented in a star or snowflake pattern and contain data from the detailed layer area. Also, data marts can be implemented as a multidimensional OLAP cube. Data marts are the basis for multidimensional analysis (OLAP) data. In the corporate data warehouse 200, the detailed layer and data marts are located in the permanent data storage area 220 (FIG. 2).
[63] Осуществление преобразований метаданных и обрамление их в хранимые процедуры, реализуется с помощью шаблонов обновления данных, работающих по типу java run-time подстановок, аналогично Apache Jakarta Project , где такая техника использовалась как основа шаблона Model-View Controller для web- приложений. Правила преобразования могут храниться в поколоночном представлении. Эти данные могут быть представлены в виде табличного представления и/или в виде электронных таблиц Excel, и/или в любой реляционной БД. [63] Implementation of metadata transformations and framing them into stored procedures is implemented using data update templates that work like java run-time substitutions, similarly to the Apache Jakarta Project, where this technique was used as the basis of the Model-View Controller template for web applications. Conversion rules can be stored in a column view. This data can be presented as a table. representations and / or in the form of Excel spreadsheets, and / or in any relational database.
[64] В некоторых вариантах осуществления шаблоном обновления данных является шаблон SQL-процедуры. [64] In some embodiments, the data update pattern is a SQL procedure template.
[65] В данном техническом решении используется стратегия обновления данных детального слоя и витрин данных, которая представляет собой способ записи исходного набора данных в формате таблицы детального слоя в таблицу детального слоя, в результате чего решается задача выстраивания истории. [65] This technical solution uses the strategy of updating the detailed layer data and data marts, which is a way to write the initial data set in the detailed layer table format to the detailed layer table, which solves the problem of building a history.
[66] В отличие от способов форматирования исходных данных в формат детального слоя (слой В -> слой N), шаблон обновления данных (слой N слой Т) полностью стандартен, и может быть описан в 52Т-файле посредством указания названия стратегии обновления и ее параметров в виде шаблона обновления данных. [66] In contrast to the ways of formatting the source data in the format of the detailed layer (layer B -> layer N), the data update pattern (layer N layer T) is completely standard, and can be described in a 52T file by specifying the name of the update strategy and its parameters as a data update template.
[67] В данном техническом решении могут использоваться, например, следующие шаблоны обновления данных «снимок данных - снимок данных», «снимок данных - история данных», «история данных - история данных». Данные стратегии реализуются в зависимости от вида исходных данных и требований к конечным данным. [67] In this technical solution, for example, the following data update templates “data snapshot - data snapshot”, “data snapshot - data history”, “data history - data history” can be used. These strategies are implemented depending on the type of source data and requirements for the final data.
[68] Стратегия обновления данных «снимок данных - снимок данных» работает следующим образом. Неисторичные данные из источника данных перекладываются в неисторичные таблицы в детальный слой хранилища данных. Данный шаблон обновления данных может применяться для контейнеров суррогатных ключей (договора, клиенты и пр.), а также для транзакционных данных (финансовых операций, проводок и пр.). Если поля источника, использующиеся для расчета первичного ключа детального слоя, могут перезаписываться на источнике, то поддерживают эмуляцию режима репликации. Репликация — это процесс, под которым понимается копирование данных из одного источника на другой (или на множество других) и наоборот. Причем данный шаблон обновления данных может работать с накоплением данных и без накопления данных. [68] The data refresh strategy “data snapshot - data snapshot” works as follows. Non-historical data from the data source is transferred to non-historical tables in the detailed data storage layer. This data update template can be used for surrogate key containers (contracts, clients, etc.), as well as for transactional data (financial transactions, transactions, etc.). If the source fields used to calculate the primary key of the detailed layer can be overwritten on the source, then they support emulation of the replication mode. Replication is a process that means copying data from one source to another (or to many others) and vice versa. Moreover, this data update template can work with data accumulation and without data accumulation.
[69] Стратегия обновления данных «снимок данных - история данных» работает следующим образом. Данные, для которых на источнике не ведется история изменения, сохраняются в детальный слой постоянного хранилища данных с созданием истории. При этом из детального слоя удаляется история за более поздние периоды, чем тот, что пришел в текущем пакете обновления. Если поля источника, использующиеся для расчета первичного ключа детального слоя, могут перезаписываться на источнике, то поддерживают эмуляцию режима репликации. [69] The data refresh strategy “data snapshot - data history” works as follows. Data for which no change history is maintained at the source is stored in a detailed layer of a permanent data warehouse with history creation. At the same time, the history for later periods is removed from the detailed layer than the one that came in the current update package. If the fields source used to calculate the primary key of the detailed layer can be overwritten on the source, then support replication mode emulation.
[70] Стратегия обновления данных «история данных - история данных» работает следующим образом. Выполняется полная репликация истории данных, ведущейся на источнике с привязкой к дате / времени изменения значения атрибута (или с привязкой к периодам дат - датам / времени начала и окончания действия), в детальный слой хранилища данных. При этом, для исключения проблемы с обновлением поля «дата актуальности» на источнике, поддерживают эмуляцию режима репликации. При загрузке исходных наборов данных с историей на дату, разрывы в истории детального слоя не допускаются. Пересечений в истории детального слоя не допускается; усечению подлежит более ранний период из двух пересекающихся. История за определенный период может быть также загружена шаблоном «снимок - снимок», если нет необходимости в устранении пересечения периодов истории. Для этого необходимо обеспечивать эмуляцию режима репликации причем в состав ключа должны входить как поля, на основе которых рассчитывается первичный ключ в детальном слое, так и поля, содержащие начало и окончание периода актуальности. [70] The strategy of updating data “data history - data history” works as follows. Performs full replication of the data history, which is maintained at the source with reference to the date / time of an attribute value change (or linked to date periods - dates / start and end dates), to the detailed data storage layer. At the same time, to exclude problems with updating the "date of relevance" field at the source, support replication mode emulation. When loading source datasets with a history for the date, gaps in the history of the detailed layer are not allowed. No intersection in the history of the detailed layer is allowed; an earlier period of two intersecting ones is subject to truncation. A history for a certain period can also be loaded with a “snapshot-snapshot” template, if there is no need to eliminate the intersection of historical periods. For this, it is necessary to provide emulation of the replication mode; the key should include both the fields on the basis of which the primary key is calculated in the detailed layer and the fields containing the beginning and end of the relevance period.
[71] Формирование суррогатного ключа может осуществляться путем ведения и мапирования исходных наборов натуральныхх ключей на последовательность целочисленных значений или, как показано на Фиг. 4, может определяться на основании значения уникального ключа сущности по следующей формуле: [71] The formation of a surrogate key can be carried out by keeping and mapping the initial sets of natural keys to a sequence of integer values or, as shown in FIG. 4, can be determined based on the value of the unique key of an entity using the following formula:
[72] Для сущностей с уникальным ключом, состоящим из одного атрибута. [72] For entities with a unique key consisting of one attribute.
SURROGATE KEY = SHA1 (NNN || SOURCE KEY1 ) SURROGATE KEY = SHA1 (NNN || SOURCE KEY1)
[73] Для сущностей с составным уникальным ключом: [73] For entities with a composite unique key:
SURROGATE KEY = SHA1 (NNN || SHA1 (SOURCE KEY1 )[ [|| SURROGATE KEY = SHA1 (NNN || SHA1 (SOURCE KEY1) [[||
SHA1 (SOURCE_KEY2)] || ... || SHA1 (SOURCE_KEYN)]) SHA1 (SOURCE_KEY2)] || ... || SHA1 (SOURCE_KEYN)])
[74] где [74] where
[75] NNN - 3-х символьный код исходной системы; [75] NNN - 3-character code of the source system;
[76] SHA1 - функция получения значения хеша по алгоритму SHA1 ; [76] SHA1 - the function of obtaining the hash value according to the SHA1 algorithm;
[77] SOURCE KEY1 .. SOURCE KEYN - колонки, входящие в уникальный ключ таблицы из исходной системы, если уникальный ключ представлен более чем одним полем, то используется конкатенированное значение всех полей входящих в ключ с разделителем «|»; [78] И - операция конкатенации. [77] SOURCE KEY1 .. SOURCE KEYN - columns included in the unique key of the table from the source system, if the unique key is represented by more than one field, then the concatenated value of all the fields in the key with the separator “|” is used; [78] And - operation of concatenation.
[79] Суррогатные ключи, полученные по данной схеме, могут иметь вид 160 битного 16-ричного кода. В дальнейшем такие ключи удобно использовать для связывания не унифицированных сущностей. [79] The surrogate keys obtained according to this scheme can be in the form of a 160-bit hexadecimal code. In the future, such keys are conveniently used to bind non-unified entities.
[80] В некоторых вариантах осуществления используют представление Apache [80] In some embodiments, an Apache view is used.
Hive для расчета значений суррогатных ключей. Hive представляет из себя движок, который превращает SQL-запросы в цепочки map-reduce задач. Движок включает в себя такие компоненты, как Parser (разбирает входящие SQL- запросы), Optimizer (оптимизирует запрос для достижения большей эффективности), Planner (планирует задачи на выполнение), Executor(3a пускает задачи на фреймворке MapReduce. Hive for calculating surrogate key values. Hive is an engine that turns SQL queries into chains of map-reduce tasks. The engine includes components such as Parser (parses incoming SQL queries), Optimizer (optimizes the query for greater efficiency), Planner (schedules tasks for execution), Executor (3a starts tasks on the MapReduce framework.
[81] Для работы Hive также необходимо хранилище метаданных. SQL предполагает работу с такими объектами как база данных, таблица, колонки, строчки, ячейки и т.д. Поскольку сами данные, которые использует Hive хранятся просто в виде файлов на hdfs— необходимо где-то хранить соответствие между объектами Hive и реальными файлами. [81] Hive also requires a metadata repository. SQL assumes work with such objects as a database, a table, columns, lines, cells, etc. Since the data itself that Hive uses is simply stored as files in hdfs — it is necessary to store somewhere the correspondence between the Hive objects and the actual files.
[82] Шаг 103: осуществляют генерацию программного кода для загрузки данных в детальный слой хранилища и расчета витрин данных на основе полученных метаданных и сформированного шаблона обновления данных; [82] Step 103: generate program code for loading data into the detailed storage layer and calculating data marts based on the received metadata and the generated data update template;
[83] На Фиг. 5 показан процесс автоматический генерации программного кода, который состоит из следующих этапов. [83] FIG. 5 shows the process of automatic generation of software code, which consists of the following steps.
[84] 1 ) Получение SQL-кода на основе шаблона обновления данных, представляющих собой по меньшей мере одну хранимую процедуру, из S2T- файла; [84] 1) Retrieving the SQL code based on the data update pattern, which is at least one stored procedure, from an S2T file;
[85] S2T файл может выглядеть следующим образом: [85] An S2T file might look like this:
[86] 2) инкапсуляция этого программного кода в исполнимый модуль (процедуру), со стандартными входными и выходными параметрами, системой логирования и обработки ошибок и способами восстановления процесса загрузки в случае технологического падения; [86] 2) encapsulation of this program code into an executable module (procedure), with standard input and output parameters, a logging and error handling system, and ways to restore the boot process in the event of a technological failure;
[87] 3) вставка вызова этой процедуры в сценарий метаданных, который читается фреймворком в run-time режиме и последовательно и/или параллельно исполняет инструкции из шаблона. [87] 3) inserting a call to this procedure into a metadata script that is read by the framework in run-time mode and sequentially and / or in parallel executes instructions from the template.
[88] Внутри шаблонов процедур (Фиг. 5) реализуются различные «case» или «if else» ветви реализации, зависящие от флагов запуска. В свою очередь флаги запуска задаются общими флагами проекта, флагами этапа преобразования, конкретными флагами преобразования и т.п. [88] Within the procedure templates (FIG. 5), various “case” or “if else” branches of the implementation are implemented, depending on the launch flags. In turn, the launch flags are set by the general project flags, the flags of the conversion stage, the specific conversion flags, etc.
[89] Результатом обработки каждого шаблона является непосредственно сгенерированный рабочий код программы. Дополнительно в результате работы шаблона получают лог работы, который включает все входные макропеременные, а также трассировочный файл (trace-файл), в котором могут содержаться все значения переменных, используемых структур данных и массивов (коллекций). [89] The processing of each template results in directly generated working program code. Additionally, as a result of the template operation, a work log is received, which includes all input macro variables, as well as a trace file (trace file), which can contain all values of variables, used data structures and arrays (collections).
[90] Каждое преобразование может содержать или имя, или условное обозначение используемых шаблонов. [90] Each transformation can contain either the name or symbol of the templates used.
[91] Входными данными для шаблона процедуры могут служить: скалярные переменные, векторные элементы (массивы, списки, хэш-таблицы), а также многомерные элементы (вектора векторов). В качестве элементов могут выступать как простейшие элементы, так комплексные объекты (объекты на основе разработанных Java-классов). [91] The input data for the procedure template can be: scalar variables, vector elements (arrays, lists, hash tables), as well as multidimensional elements (vector vectors). The elements can be either the simplest elements or complex objects (objects based on the developed Java classes).
[92] Шаг 104: автоматически устанавливают сгенерированный на предыдущем шаге программный код на среду хранилища данных для выполнения загрузок; [92] Step 104: automatically install the program code generated in the previous step onto the data warehouse environment to perform the downloads;
[93] На данном шаге создается патч, который содержит сгенерированный программный код, в формате и структуре соответствующей стандартам релизно- конфигурационного управления, который в режиме run-time устанавливается на среду разработку. В патч также может быть включен сценарий установки патча с инструкциями для консоли администратора. Патч, готовый для установки на среду разработки корпоративного хранилища данных, является совместимым с системой автоматического распространения патчей по стендам. [94] Объекты, базы данных, которые входят в патч, в том же порядке устанавливаются на среду разработки. Если возникают ошибки, они присутствуют в журнале событий и видны пользователю. Набор журналов событий содержит подробный разбор возможных ошибок и предупреждений. Однотипные объекты сгруппированы в директории по типам данных и находятся внутри суффиксов имен баз данных, их последующего размещения. [93] In this step, a patch is created that contains the generated program code in the format and structure of the standards-compliant release-configuration management, which is installed on the development environment in run-time mode. The patch can also include a patch installation script with instructions for the admin console. The patch, ready to be installed on the corporate data warehouse development environment, is compatible with the system of automatic distribution of patches to the stands. [94] The objects, databases that are included in the patch, are installed on the development environment in the same manner. If errors occur, they are in the event log and visible to the user. The set of event logs contains a detailed analysis of possible errors and warnings. Objects of the same type are grouped in directories by data types and are located inside the suffixes of the database names and their subsequent location.
[95] Ниже в Таблице 1 показана типовая структура патча. Особо следует обратить внимание на SetupManual_000000.txt, в котором автоматически создается последовательность шагов для установки патча (дистрибутива) на все среды. [95] Table 1 below shows a typical patch structure. Particular attention should be paid to the SetupManual_000000.txt, in which a sequence of steps is automatically created for installing the patch (distribution) on all environments.
Таблица 1 Table 1
[96] В режиме “Compile”=”true” все объекты патча создаются на среде разработки. То есть в режиме выполнения кодогенерации все объекты, которые войдут в патч, создаются на среде разработки. [96] In the “Compile” = ”true” mode, all patch objects are created on the development environment. That is, in the mode of code generation, all objects that will be included in the patch are created on the development environment.
[97] Шаг 105: осуществляют переиспользование метаданных обновления детального слоя и витрин данных. [97] Step 105: reuse the detailed layer update metadata and data marts.
[98] При внесении изменений в постановку задачи осуществляют пере использование метаданных обновления детального слоя и витрин данных за счет внесения дельты изменений в вышеуказанную S2T форму [98] When making changes in the formulation of the task, they reuse the metadata for updating the detailed layer and data marts by introducing a delta of changes in the above S2T form
[99] При смене типа реляционной базы данных осуществляют переиспользование метаданных обновления детального слоя и витрин данных для формирования сценария наполнения путем переключения базовых шаблонов обновления. [99] When changing the type of relational database, reuse of update metadata of the detailed layer and data marts is carried out to form the filling scenario by switching the basic update templates.
[100] Затем осуществляют переиспользование сгенерированного программного кода и метаданных. После реализации первой версии патча (дистрибутива) по какой-то задаче практически всегда следуют изменения к этой задаче, вызванные как новыми требованиями бизнеса, так и изменениями, вызванными исправлениями первой версии. Результатом этих изменений могут быть создание новых объектов, удаление старых объектов, изменение процедур, изменение сценариев. [100] Then re-use the generated program code and metadata. After the implementation of the first version of the patch (distribution) for a task, changes to this task almost always follow, caused by both new business requirements and changes caused by corrections of the first version. The result of these changes may be the creation of new objects, deletion of old objects, change of procedures, change of scripts.
[101] Для реализации этих изменений могут использовать два подхода. [101] To implement these changes can use two approaches.
[102] Первым подходом является внесение изменений в имеющийся файл (структуру) S2T и пересоздание всего патча, то есть реализация нового патча (кумулятивного патча). После этого изменения могут быть выделены системой управления версиями (git), используемой для ведения кода. [102] The first approach is to make changes to the existing S2T file (structure) and re-create the entire patch, that is, implement a new patch (cumulative patch). After this, changes can be highlighted by the version control system (git) used to maintain the code.
[103] Вторым вариантом является выполнение автоматических пометок в закладках S2T измененных преобразований и тогда только они войдут в патч. В интерфейс патч должет быть помечен, как инкрементальный. [104] Возникают изменения, вызванные потребностями работы процесса. Данные изменения вносятся в имеющиеся метаданные, описанные в S2T и при генерации осуществляется переиспользование ранее введенных метаданных. [103] The second option is to perform automatic marking in the S2T tabs of the modified transformations and then only they will be included in the patch. The patch interface should be marked as incremental in the interface. [104] There are changes caused by the needs of the work process. These changes are made to the existing metadata described in S2T and during generation, the previously used metadata is reused.
[105] Аспекты настоящего изобретения могут быть также реализованы с помощью устройства обработки данных, являющимся вычислительной машиной или системой (или таких средств, как центральный/графический процессор или микропроцессор), которая считывает и исполняет программу, записанную на запоминающее устройство, чтобы выполнять функции вышеописанного варианта (ов) осуществления, и способа, показанного на Фиг. 1 , этапы которого выполняются вычислительной машиной или устройством путем, например, считывания и исполнения программы, записанной на запоминающем устройстве, чтобы исполнять функции вышеописанного варианта(ов) осуществления. С этой целью программа записывается на вычислительную машину, например, через сеть или со среды для записи различных типов, служащей в качестве запоминающего устройства (например, машиночитаемой среды). [105] Aspects of the present invention may also be implemented using a data processing device that is a computing machine or system (or tools such as a central / graphics processor or microprocessor) that reads and executes a program stored in memory to perform the functions described above. the embodiment (s) and the method shown in FIG. 1, the steps of which are performed by a computing machine or device by, for example, reading and executing a program recorded on a memory device in order to perform the functions of the embodiment described above (s). To this end, the program is recorded on a computer, for example, via a network or from a medium for recording various types, serving as a storage device (for example, a computer-readable medium).
[106] Устройство обработки данных может иметь дополнительные особенности или функциональные возможности. Например, устройство обработки данных может также включать в себя дополнительные устройства хранения данных (съемные и несъемные), такие как, например, магнитные диски, оптические диски или лента. Устройства хранения данных могут включать в себя энергозависимые и энергонезависимые, съемные и несъемные носители, реализованные любым способом или при помощи любой технологии для хранения информации, такой как машиночитаемые инструкции, структуры данных, программные модули или другие данные. Устройство хранения данных, съемное хранилище и несъемное хранилище являются примерами компьютерных носителей данных. Компьютерные носители данных включают в себя, но не в ограничительном смысле, оперативное запоминающее устройство (ОЗУ), постоянное запоминающее устройство (ПЗУ), электрически стираемое программируемое ПЗУ (EEPROM), флэш-память или память, выполненную по другой технологии, ПЗУ на компакт-диске (CD-ROM), универсальные цифровые диски (DVD) или другие оптические запоминающие устройства, магнитные кассеты, магнитные ленты, хранилища на магнитных дисках или другие магнитные запоминающие устройства, или любую другую среду, которая может быть использована для хранения желаемой информации и к которой может получить доступ устройство обработки данных. Устройство обработки данных может также включать в себя устройство(а) ввода, такие как клавиатура, мышь, перо, устройство с речевым вводом, устройство сенсорного ввода, и так далее. Устройство (а) вывода, такие как дисплей, динамики, принтер и тому подобное, также могут быть включены в состав системы. [106] The data processing device may have additional features or functionality. For example, a data processing device may also include additional data storage devices (removable and non-removable), such as, for example, magnetic disks, optical disks, or tape. Storage devices can include volatile and nonvolatile, removable and non-removable media implemented in any method or using any technology for storing information, such as computer-readable instructions, data structures, program modules or other data. Storage device, removable storage and non-removable storage are examples of computer storage media. Computer storage media includes, but is not in a limiting sense, random access memory (RAM), read-only memory (ROM), electrically erasable programmable ROM (EEPROM), flash memory or memory made using a different technology, ROM on a CD disk (CD-ROM), digital versatile disks (DVDs) or other optical storage devices, magnetic cassettes, magnetic tapes, storages on magnetic disks or other magnetic storage devices, or any other medium that can be used on to store the desired information and which the data processing device can access. The processing unit may also include input device (s) such as keyboard, mouse, pen, voice input device, touch input device, and so on. An output device (s) such as a display, speakers, a printer, and the like may also be included in the system.
[107] Устройство обработки данных содержит коммуникационные соединения, которые позволяют устройству связываться с другими вычислительными устройствами, например по сети. Сети включают в себя локальные сети и глобальные сети наряду с другими большими масштабируемыми сетями, включая, но не в ограничительном смысле, корпоративные сети и экстрасети. Коммуникационное соединение является примером коммуникационной среды. Как правило, коммуникационная среда может быть реализована при помощи машиночитаемых инструкций, структур данных, программных модулей или других данных в модулированном информационном сигнале, таком как несущая волна, или в другом транспортном механизме, и включает в себя любую среду доставки информации. Термин «модулированный информационный сигнал» означает сигнал, одна или более из его характеристик изменены или установлены таким образом, чтобы закодировать информацию в этом сигнале. Для примера, но без ограничения, коммуникационные среды включают в себя проводные среды, такие как проводная сеть или прямое проводное соединение, и беспроводные среды, такие как акустические, радиочастотные, инфракрасные и другие беспроводные среды. Термин «машиночитаемый носитель», как употребляется в этом документе, включает в себя как носители данных, так и коммуникационные среды. Последовательности процессов, описанных в этом документе, могут выполняться с использованием аппаратных средств, программных средств или их комбинации. Когда процессы выполняются с помощью программных средств, программа, в которой записана последовательность процессов, может быть установлена и может выполняться в памяти компьютера, встроенного в специализированное аппаратное средство, или программа может быть установлена и может выполняться на компьютер общего назначения, который может выполнять различные процессы. [107] The data processing device contains communication connections that allow the device to communicate with other computing devices, such as over a network. Networks include local area networks and global networks along with other large scalable networks, including but not limited to corporate networks and extranets. A communication connection is an example of a communication environment. Typically, the communication medium may be implemented using computer-readable instructions, data structures, program modules or other data in a modulated information signal, such as a carrier wave, or in another transport mechanism, and includes any information delivery medium. The term "modulated information signal" means a signal that has one or more of its characteristics changed or set to encode information in this signal. For example, but without limitation, communication media includes wired environments such as a wired network or direct-wired connection, and wireless environments such as acoustic, radio frequency, infrared, and other wireless environments. The term “computer readable medium”, as used herein, includes both data carriers and communication media. The sequences of the processes described in this document may be performed using hardware, software, or a combination of both. When processes are performed using software tools, the program in which the sequence of processes is recorded can be installed and can be executed in the memory of a computer embedded in the specialized hardware, or the program can be installed and run on a general purpose computer that can perform various processes. .
[108] Например, программа может быть заранее записана на носитель записи, такой как жесткий диск, или ПЗУ (постоянное запоминающее устройство). В качестве альтернативы, программа может быть временно или постоянно сохранена (записана) на съемном носителе записи, таком как гибкий диск, CD- ROM (компакт-диск, предназначенный только для воспроизведения), МО (магнитооптический) диск, DVD (цифровой универсальный диск), магнитный диск или полупроводниковая память. Съемный носитель записи может распространяться в виде так называемого, продаваемого через розничную сеть программного средства. [108] For example, a program may be pre-recorded onto a recording medium, such as a hard disk, or a ROM (Read Only Memory). Alternatively, the program may be temporarily or permanently stored (recorded) on a removable recording medium, such as a floppy disk, CD-ROM (CD for playback only), MO (magneto-optical) disk, DVD (digital versatile disk), magnetic disk or semiconductor memory. Removable recording media can be distributed in the form of so-called, sold through a retail network software.
[109] Программа может быть установлена со съемного носителя записи, описанного выше, на компьютер, или может быть передана по кабелю с сайта загрузки в компьютер или может быть передана в компьютер по сетевым каналам передачи данных, таким как ЛВС (локальная вычислительная сеть) или Интернет. Компьютер может принимать переданную, таким образом, программу и может устанавливать ее на носитель записи, такой как встроенный жесткий диск. [109] The program can be installed from a removable recording medium, described above, on a computer, or it can be transferred by cable from a download site to a computer, or it can be transferred to a computer via network data transmission channels, such as a LAN (local area network) or The Internet. A computer can receive a program transmitted in this way and can install it on a recording medium, such as an internal hard disk.
[110] Процессы, описанные в этом документе, могут выполняться последовательно по времени, в соответствии с описанием, или могут выполняться параллельно или отдельно, в зависимости от характеристик обработки устройства, выполняющего процессы, или в соответствии с необходимостью. Система, описанная в этом документе, представляет собой логический набор множества устройств и не ограничивается структурой, в которой эти устройства установлены в одном корпусе. [110] The processes described in this document can be performed sequentially in time, as described, or can be executed in parallel or separately, depending on the processing characteristics of the device performing the processes, or according to need. The system described in this document is a logical set of multiple devices and is not limited to the structure in which these devices are installed in a single package.
Claims
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| RU2017146232A RU2683690C1 (en) | 2017-12-27 | 2017-12-27 | Method and system for automatic generation of a program code for an enterprise data warehouse |
| RU2017146232 | 2017-12-27 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2019132689A1 true WO2019132689A1 (en) | 2019-07-04 |
Family
ID=66089746
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/RU2017/000981 Ceased WO2019132689A1 (en) | 2017-12-27 | 2017-12-27 | Automated software code generation for a corporate data warehouse |
Country Status (2)
| Country | Link |
|---|---|
| RU (1) | RU2683690C1 (en) |
| WO (1) | WO2019132689A1 (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN114265847A (en) * | 2021-12-30 | 2022-04-01 | 中国民航信息网络股份有限公司 | Database table information recording method and device |
Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US6212524B1 (en) * | 1998-05-06 | 2001-04-03 | E.Piphany, Inc. | Method and apparatus for creating and populating a datamart |
| US7840607B2 (en) * | 2004-08-06 | 2010-11-23 | Siemens Aktiengesellschaft | Data mart generation and use in association with an operations intelligence platform |
| US8504513B2 (en) * | 2009-11-25 | 2013-08-06 | Microsoft Corporation | Auto-generation of code for performing a transform in an extract, transform, and load process |
| US20150100542A1 (en) * | 2013-10-03 | 2015-04-09 | International Business Machines Corporation | Automatic generation of an extract, transform, load (etl) job |
| US9519695B2 (en) * | 2013-04-16 | 2016-12-13 | Cognizant Technology Solutions India Pvt. Ltd. | System and method for automating data warehousing processes |
| US20170220654A1 (en) * | 2016-02-03 | 2017-08-03 | Wipro Limited | Method for automatically generating extract transform load (etl) codes using a code generation device |
Family Cites Families (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US7685561B2 (en) * | 2005-02-28 | 2010-03-23 | Microsoft Corporation | Storage API for a common data platform |
| BRPI0615761A2 (en) * | 2005-09-09 | 2011-05-24 | Microsoft Corp | programmability for xml document store |
-
2017
- 2017-12-27 WO PCT/RU2017/000981 patent/WO2019132689A1/en not_active Ceased
- 2017-12-27 RU RU2017146232A patent/RU2683690C1/en active
Patent Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US6212524B1 (en) * | 1998-05-06 | 2001-04-03 | E.Piphany, Inc. | Method and apparatus for creating and populating a datamart |
| US7840607B2 (en) * | 2004-08-06 | 2010-11-23 | Siemens Aktiengesellschaft | Data mart generation and use in association with an operations intelligence platform |
| US8504513B2 (en) * | 2009-11-25 | 2013-08-06 | Microsoft Corporation | Auto-generation of code for performing a transform in an extract, transform, and load process |
| US9519695B2 (en) * | 2013-04-16 | 2016-12-13 | Cognizant Technology Solutions India Pvt. Ltd. | System and method for automating data warehousing processes |
| US20150100542A1 (en) * | 2013-10-03 | 2015-04-09 | International Business Machines Corporation | Automatic generation of an extract, transform, load (etl) job |
| US20170220654A1 (en) * | 2016-02-03 | 2017-08-03 | Wipro Limited | Method for automatically generating extract transform load (etl) codes using a code generation device |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN114265847A (en) * | 2021-12-30 | 2022-04-01 | 中国民航信息网络股份有限公司 | Database table information recording method and device |
Also Published As
| Publication number | Publication date |
|---|---|
| RU2683690C1 (en) | 2019-04-01 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US12254060B2 (en) | System for synchronization of changes in edited websites and interactive applications | |
| US9229952B1 (en) | History preserving data pipeline system and method | |
| US7346628B2 (en) | Time in databases and applications of databases | |
| US20100235334A1 (en) | Time in databases and applications of databases | |
| US20170192952A1 (en) | Systems and methods for tracking and modifying actions in an action history | |
| WO2006107772A2 (en) | System and methods for facilitating a linear grid database with data organization by dimension | |
| WO2017070533A1 (en) | System and method for automatic inference of a cube schema from a tabular data for use in a multidimensional database environment | |
| US12174802B2 (en) | Model generation service for data retrieval | |
| Sreemathy et al. | Data validation in ETL using TALEND | |
| Thulasiram et al. | Real time data warehouse updates through extraction-transformation-loading process using change data capture method | |
| RU2683690C1 (en) | Method and system for automatic generation of a program code for an enterprise data warehouse | |
| WO2023111765A1 (en) | System and method for handling data consolidation from an edge device to a target database | |
| Vadlamani | Introduction to PostgreSQL Database Management | |
| EA034680B1 (en) | Method and system for automated software code generation for a corporate data warehouse | |
| US12405943B2 (en) | Generating minor compactions to capture aggregated actions for commit ranges to data files | |
| Jyoti et al. | Salesforce Data Architecture | |
| Eisa | Parallel Processing for Data Retrieval in Odoo Enterprise Resource Planning Reporting System | |
| CN117931819A (en) | Hadoop offline data increment updating method, system and storable medium | |
| Vijayendra | A courseware on ETL process | |
| Willis | Database Maintenance | |
| Luján-Mora et al. | Applying UML for Modeling the Physical Design of Data Warehouses | |
| Mostafa et al. | Investigation cloud data storage | |
| Draheim et al. | A framework for multi-tier type evolution and data migration | |
| Chen et al. | DB2 UDB V8. 2 on the Windows Environment vironment | |
| Parziale et al. | Enhancing SAP by Using DB2 9 for z/OS |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 17936062 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 17936062 Country of ref document: EP Kind code of ref document: A1 |