A unified scheduling method and system for enterprise-level data warehouse operations based on ADF

CN118426935BActive Publication Date: 2024-09-10GUANGZHOU YUECHUANG ZHISHU INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410875652.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-02
Publication Date
2024-09-10
Estimated Expiration
2044-07-02

AI Technical Summary

Technical Problem

[0007]本发明为了解决现有技术缺乏对数据仓库作业的统一管理机制的问题,提供了一种基于ADF的企业级数据仓库作业的统一调度方法与系统,其具有能够减少任务冲突以及随机误差,提高任务处理效率的特点

Benefits of technology

[0042] The invention discloses a unified scheduling method for enterprise-level data warehouse jobs based on ADF. The tasks that need to be executed on the day are inserted into the task execution table, and the number of running tasks, the maximum number of concurrent tasks, and task dependencies in the metadata database are obtained. Polling the task execution table, obtains the number of running tasks and the maximum number of concurrent tasks in the database; obtains the currently executable task list, thereby solving the problem of no task priority management mechanism in arranging enterprise-level data warehouse job workflows , The problem of task-less concurrency management mechanism. Moreover, the present invention obtains the specific task information of the tasks in the currently executable task list, distributes the tasks according to the specific task information of the tasks, and executes the distributed tasks, thereby solving the problem that the two scheduling modes of micro-batch and daily batch cannot be connected, which may occur. Conflict issues such as front-running. In summary, the present invention solves the problem of the lack of a unified management mechanism in the existing technology, and has the characteristics of being able to reduce task conflicts and random errors, and improve task processing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118426935B
    Figure CN118426935B
Patent Text Reader

Abstract

The present invention relates to the technical field of data warehouses, and discloses a unified scheduling method and system for enterprise-level data warehouse jobs based on ADF, including the following specific steps: inserting tasks that need to be executed on the day into a task execution table; polling the task execution table until the execution status of all tasks in the task execution table is completed; obtaining the number of tasks being run and the maximum number of concurrent tasks in the database; obtaining a currently executable task list, so that the tasks in the currently executable task list meet dependency conditions, and the number of tasks being run does not exceed the maximum number of concurrent tasks; obtaining specific task information of tasks in the currently executable task list; distributing tasks according to the specific task information of the tasks; and executing the distributed tasks. The present invention solves the problem that the prior art lacks a unified management mechanism for data warehouse jobs, and has the characteristics of being able to reduce task conflicts and random errors, and improve task processing efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data warehouses, and more specifically, to a unified scheduling method and system for enterprise-level data warehouse operations based on ADF. Background Art

[0002] A data warehouse (DW) is a subject-oriented, integrated, non-volatile database system used to support management decisions. Scheduling refers to the coordination and arrangement of application or system tasks according to a predetermined plan to complete a specific operation or task. In a data warehouse, scheduling is used to perform tasks such as ETL (extraction, transformation, and loading) tasks, data refresh, data backup, and data replication.

[0003] Operational data storage (ODS) is a transitional form from database to data warehouse, storing current data and providing instant, operational, and integrated information. The data in ODS is real-time and consistent with the business system, but the data stored is generally no more than one month.

[0004] Azure Data Factory ADF is a cloud-based ETL and data integration service that facilitates the creation of data-driven workflows to orchestrate data movement and transform data on a large scale, and can be used for enterprise data warehouse management; Azure Data Factory can be used to create and schedule data-driven workflows, which are called pipelines; pipelines introduce data from different data stores. You can build complex ETL processes to intuitively transform data through data flows or using computing services such as Azure HDInsight Hadoop, Azure Databricks, and Azure Synapse Analytics.

[0005] The prior art provides a scheduling method and device for a data warehouse. The method includes obtaining all tasks to be executed in the current scheduling cycle, and combining them into a dependency table according to the dependencies between each other; wherein each task to be executed includes at least a task ID and a task status; if it is determined that any task to be executed meets the preset execution condition, the corresponding task result is obtained; the corresponding verification rule is obtained according to the task ID of the task to be executed, and the task result is verified according to the verification rule; if the verification passes, the task status of the task to be executed is marked as a success status; wherein the success status is used to determine whether the downstream task of the task to be executed meets the preset execution condition.

[0006] However, the existing technology lacks a unified management mechanism for data warehouse operations. Therefore, how to invent a unified scheduling method and system for data warehouse operations that takes task priorities into consideration is a technical problem that urgently needs to be solved in this technical field. Summary of the invention

[0007] In order to solve the problem that the prior art lacks a unified management mechanism for data warehouse operations, the present invention provides a unified scheduling method and system for enterprise-level data warehouse operations based on ADF, which has the characteristics of being able to reduce task conflicts and random errors and improve task processing efficiency.

[0008] In order to achieve the above-mentioned purpose of the present invention, the technical scheme adopted is as follows:

[0009] A unified scheduling method for enterprise-level data warehouse jobs based on ADF includes the following specific steps:

[0010] Insert the tasks that need to be performed on that day into the task execution table;

[0011] Poll the task execution table until the execution status of all tasks in the task execution table is completed; obtain the number of running tasks and the maximum number of concurrent tasks in the database; obtain the currently executable task list, so that the tasks in the currently executable task list meet the dependency conditions and the number of running tasks does not exceed the maximum number of concurrent tasks;

[0012] Get the specific task information of the task in the currently executable task list; distribute the task according to the specific task information of the task;

[0013] Execute the distributed tasks.

[0014] Preferably, the tasks to be performed on that day are inserted into the task execution table, specifically:

[0015] Use ADF-based planning triggers to regularly trigger ADF-based task generation pipelines;

[0016] ADF-based task generation pipeline executes stored procedures to generate task execution tables from the task configuration tables in the ADF metadata database according to specified rules;

[0017] According to the priority of the task, the tasks that need to be executed on that day are inserted into the task execution table.

[0018] Further, the task execution table is polled until the execution status of all tasks in the task execution table is completed; the specific steps are:

[0019] Use ADF-based scheduled triggers to trigger ADF-based task polling pipelines;

[0020] Through the task polling pipeline based on ADF, the number of running tasks, the maximum number of concurrent tasks, and task dependencies in the metadata database are obtained from the task execution table, parallel task table, and task dependency table of the ADF metadata database, and the task execution table is polled;

[0021] Use the ADF judger to determine whether the number of running tasks is less than the maximum number of concurrent tasks allowed:

[0022] If yes, then the task polling pipeline based on ADF is used to obtain the currently executable task list according to the task status of the ODS table provided by the unified scheduling management mechanism library, the running status of the marketing pipeline, and the task status of the task execution table, combined with the task dependency table;

[0023] If not, after waiting for a certain period of time, re-determine whether the number of running tasks is less than the maximum number of concurrent tasks allowed.

[0024] Furthermore, the specific task information of the tasks in the currently executable task list is obtained; the tasks are distributed according to the specific task information of the tasks. The specific steps are as follows:

[0025] Adopt the task detail information acquisition pipeline based on ADF, and use the query component in ADF to obtain the specific task information of the tasks in the currently executable task list based on the incoming task list using structured query language;

[0026] The ADF-based task distribution pipeline distributes tasks according to the task type information in the specific task information of the task.

[0027] Furthermore, the distribution task is executed through an ADF-based task execution pipeline; the task execution pipeline is a general task pipeline that encapsulates multiple task pipelines, including: full replication, incremental replication, script execution, SSIS execution, stored procedure, processing model, databricks, API, and custom management.

[0028] Furthermore, before triggering the ADF-based task generation pipeline, an ADF-based scheduled trigger is also used to regularly trigger the ADF-based backup pipeline to perform key table backup jobs, and back up the task configuration table TaskConfig, task dependency table, and link service information table in the ADF metadata database to Blob storage.

[0029] Furthermore, an ADF-based plan trigger is used to periodically trigger an ADF-based task execution table archiving pipeline to archive the task execution table in the ADF metadata database, and migrate the logs within the set period from the task execution table to the task execution history table.

[0030] Furthermore, during the scheduling process, data is also protected by passwords. The specific steps are as follows:

[0031] Azure KeyVault is used to store passwords for databases including the data warehouse database, unified scheduling management mechanism library, and metadata library.

[0032] During unified scheduling, when the data warehouse database, unified scheduling management mechanism library, and metadata library are needed, ADF calls KeyVault to obtain the corresponding password and passes it to the corresponding link service.

[0033] Furthermore, when polling the task execution table through the task polling pipeline, daily batch and micro batch tasks can be polled;

[0034] For daily batch tasks, the ADF judger is used to determine whether the number of running tasks is less than the maximum number of concurrent tasks allowed. If so, the list of currently executable tasks is obtained;

[0035] For micro-batch tasks, the ADF judge is used to determine whether the number of running tasks is less than the maximum number of concurrent tasks allowed. If so, it is further determined whether there are tasks in the task execution table or the downstream DW has unfinished tasks before the current batch. If so, the unfinished task group in the task group in the task execution table is first obtained, and then the current batch is obtained; otherwise, the current executable task list of the current task group is obtained.

[0036] A unified scheduling system for enterprise-level data warehouse operations based on ADF, including a cascaded task generation module, a task polling module, a task distribution module, and a task work module;

[0037] The task generation module is used to insert the tasks to be executed on the day into the task execution table;

[0038] The task polling module is used to poll the task execution table until the execution status of all tasks in the task execution table is completed; obtain the number of tasks being run and the maximum number of concurrent tasks in the database; obtain the currently runnable task list, so that the tasks in the currently runnable task list meet the dependency conditions and the number of tasks being run does not exceed the maximum number of concurrent tasks;

[0039] The task distribution module is used to obtain specific task information of tasks in the currently executable task list; and distribute tasks according to the specific task information of the tasks;

[0040] The task work module is used to execute the distributed tasks.

[0041] The beneficial effects of the present invention are as follows:

[0042] The present invention discloses a unified scheduling method for enterprise-level data warehouse jobs based on ADF, inserting the tasks that need to be executed on the day into the task execution table, obtaining the number of tasks running, the maximum number of concurrent tasks, and the task dependency in the metadata database, and polling the task execution table, obtaining the number of tasks running and the maximum number of concurrent tasks in the database; obtaining the currently executable task list, thereby the present invention solves the problem of no task priority management mechanism and no task concurrency management mechanism in the arrangement of enterprise-level data warehouse job workflows. In addition, the present invention obtains the specific task information of the tasks in the currently executable task list, distributes the tasks according to the specific task information of the tasks, and executes the distributed tasks, thereby solving the problem that the two scheduling modes of micro-batch and daily batch cannot be connected, and conflicts such as preemption will occur. In summary, the present invention solves the problem of the lack of a unified management mechanism in the prior art, and has the characteristics of being able to reduce task conflicts and random errors and improve task processing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1 The present invention is a flowchart of a unified scheduling method for enterprise-level data warehouse operations based on ADF.

[0044] Figure 2 It is a logical architecture diagram of a unified scheduling method for enterprise-level data warehouse operations based on ADF in Example 2 of the present invention.

[0045] Figure 3 The system workflow diagram of the unified scheduling system for enterprise-level data warehouse operations based on ADF of the present invention. DETAILED DESCRIPTION

[0046] The present invention is described in detail below with reference to the accompanying drawings and specific embodiments.

[0047] Example 1

[0048] like Figure 1 As shown, a unified scheduling method for enterprise-level data warehouse jobs based on ADF includes the following specific steps:

[0049] Insert the tasks that need to be performed on that day into the task execution table;

[0050] Poll the task execution table until the execution status of all tasks in the task execution table is completed; obtain the number of running tasks and the maximum number of concurrent tasks in the database; obtain the currently executable task list, so that the tasks in the currently executable task list meet the dependency conditions and the number of running tasks does not exceed the maximum number of concurrent tasks;

[0051] Get the specific task information of the task in the currently executable task list; distribute the task according to the specific task information of the task;

[0052] Execute the distributed tasks.

[0053] In this embodiment, the specific task information includes: task primary key, task ID, task type, task name, task frequency, source Host, source database name, source Schema, source table name, target Host, target database name, target table name, query statement / SSIS path, increment and decrement flag, front SQL script, whether to enable temporary storage, task priority, lazy state, task status: 0-NotStarted, 1-Running, 2-Success, 3-Failed, whether to skip, number of retries, number of executions, data date, earliest executable time, pipeline name, task pipeline run ID, queue length, other task execution information, error information, parameter settings, DataCopy replication settings, source other property settings, and target other property settings.

[0054] In this embodiment, Figure 2 As shown, in the job generation phase, a schedule trigger based on ADF is used to initiate the job at 00:05 every day. The stored procedure for generating the job is called through the ADF pipeline, and the tasks to be executed on that day are inserted into the task execution table of the ADF metadata database.

[0055] In the job polling stage, a schedule trigger based on ADF is used to initiate the job at 00:30 every day. Through the ADF circulator activity, the task execution table is polled until the execution status of all tasks in the task execution table is completed, and then the polling is exited. If the job fails to complete within 16 hours, it will also time out and exit the polling.

[0056] In the job search phase, the job polling pipeline initiates the execution. It will find the detailed information of the tasks that meet the dependencies based on the current number of running tasks, the maximum number of concurrent tasks, and task dependencies, and control the maximum number of executed tasks not to exceed the value of the maximum concurrent tasks.

[0057] In the job distribution phase, the job search pipeline initiates execution and distributes tasks based on task types.

[0058] During the job execution phase, the job distribution pipeline initiates the execution and executes the tasks according to the tasks distributed by the job distribution pipeline.

[0059] In this embodiment, in order to unify and standardize management and avoid generating too many non-standard task pipelines, the Azure Data Factory (ADF) encapsulates universal task pipelines according to different processing methods to adapt to different task types. Currently, 6 types are encapsulated, as follows:

[0060] Full replication: used to perform the task of full data synchronization;

[0061] Incremental replication: used to perform incremental synchronization of data;

[0062] Execute script: used to execute script tasks;

[0063] Execute SSIS: used to execute SSIS tasks;

[0064] Execute stored procedure: a task used to execute stored procedures;

[0065] Processing table model: used to perform tasks for processing table models;

[0066] In addition, as the number of task types increases, it is also necessary to continue to expand pipeline types: such as job execution, full replication, incremental replication, script execution, SSIS execution, stored procedures, processing models, Databricks, API, and custom management.

[0067] Example 2

[0068] More specifically, in a specific embodiment, the tasks to be executed on the day are inserted into the task execution table, specifically:

[0069] Use ADF-based planning triggers to regularly trigger ADF-based task generation pipelines;

[0070] ADF-based task generation pipeline executes stored procedures to generate task execution tables from the task configuration tables in the ADF metadata database according to specified rules;

[0071] According to the priority of the task, the tasks that need to be executed on that day are inserted into the task execution table.

[0072] In a specific embodiment, the task execution table is polled until the execution status of all tasks in the task execution table is completed; the specific steps are:

[0073] Use ADF-based scheduled triggers to trigger ADF-based task polling pipelines;

[0074] Through the task polling pipeline based on ADF, the number of running tasks, the maximum number of concurrent tasks, and task dependencies in the metadata database are obtained from the task execution table, parallel task table, and task dependency table of the ADF metadata database, and the task execution table is polled;

[0075] Use the ADF judger to determine whether the number of running tasks is less than the maximum number of concurrent tasks allowed:

[0076] If yes, then the task polling pipeline based on ADF is used to obtain the currently executable task list according to the task status of the ODS table provided by the unified scheduling management mechanism library, the running status of the marketing pipeline, and the task status of the task execution table, combined with the task dependency table;

[0077] If not, after waiting for a certain period of time, re-determine whether the number of running tasks is less than the maximum number of concurrent tasks allowed.

[0078] In a specific embodiment, specific task information of a task in a currently executable task list is obtained; and tasks are distributed according to the specific task information of the task. The specific steps are as follows:

[0079] Adopt the task detail information acquisition pipeline based on ADF, and use the query component in ADF to obtain the specific task information of the tasks in the currently executable task list based on the incoming task list using structured query language;

[0080] The ADF-based task distribution pipeline distributes tasks according to the task type information in the specific task information of the task.

[0081] In a specific embodiment, the distribution task is executed through an ADF-based task execution pipeline; the task execution pipeline is a general task pipeline that encapsulates multiple task pipelines, including: full replication, incremental replication, script execution, SSIS execution, stored procedure, processing model, databricks, API, and custom management.

[0082] In this embodiment, the task scheduling architecture is based on a task generation pipeline, a task polling pipeline, a task distribution pipeline, and a task execution pipeline;

[0083] In this embodiment, when generating tasks, the task generation pipeline uses an ADF-based schedule trigger to trigger the ADF-based pipeline G01_GenerateTask at 00:05 every day, and executes the stored procedure P_GenerateTaskExecutionExWrapper to generate tasks from the TaskConfig table in the ADF metadata library ADF_SchProcFwk to the table TaskExecution according to the specified rules;

[0084] In this embodiment, task polling uses a scheduled trigger based on ADF, and triggers the task polling pipeline O01_PollTasks based on ADF at 00:30 every day. The task poller O01_PollTasks encapsulated by ADF executes the following contents:

[0085] Get the number of running tasks from the TaskExecution table in the ADF metadata database ADF_SchProcFwk, and the maximum number of concurrent tasks allowed to be executed from the TaskParallel table;

[0086] Determine whether the number of running tasks is less than the maximum number of concurrent tasks allowed

[0087] If yes, then according to the task status of the ODS table provided by the upper system ODS, the running status of the marketing pipeline and the task status of TaskExecution, combined with the task dependency table, the list of currently executable tasks is obtained. This function is encapsulated in the stored procedure P_GetTaskDetailsWrapper in the ADF metadata library ADF_SchProcFwk, and is called in the task polling pipeline O01_PollTasks encapsulated in ADF. Then the task details information acquisition pipeline is triggered;

[0088] If no, wait 120 seconds.

[0089] In this embodiment, after the task detail information acquisition pipeline is triggered, it will use the LookUp group in ADF to enable SQL to obtain the task detail information from the table TaskExecution in the ADF metadata library ADF_SchProcFwk according to the incoming task list, and trigger the task distribution pipeline.

[0090] The task distribution pipeline is triggered by the task detail information acquisition pipeline. When triggered, it will distribute tasks based on the task type information passed in by the task detail information acquisition pipeline. Trigger the task execution pipeline.

[0091] In this embodiment, the task execution pipeline includes pipelines of various task types;

[0092] In a specific embodiment, before triggering the ADF-based task generation pipeline, an ADF-based plan trigger is also used to periodically trigger the ADF-based backup pipeline to perform key table backup jobs, and back up the task configuration table TaskConfig, task dependency table, and link service information table in the ADF metadata database to Blob storage.

[0093] In this embodiment, an ADF-based scheduled trigger is used to trigger the ADF-based pipeline U03_BackupSchPorcwk_KeyTable to perform a key table backup job at 00:01 every day, and back up the tables TaskConfig, TaskDependencies, and RF_LinkedCD in the ADF metadata library ADF_SchProcFwk to the Blob storage adlsedwprd01e2.

[0094] The unified scheduling mechanism is a key core system. If its metadata database data is accidentally lost due to some force majeure factors, it will cause a systemic disaster. Therefore, a key data table backup mechanism is designed for disaster recovery.

[0095] In a specific embodiment, an ADF-based plan trigger is used to periodically trigger an ADF-based task execution table archiving pipeline to archive the task execution table in the ADF metadata database, and migrate the logs within a set period from the task execution table to the task execution history table.

[0096] In this embodiment, an ADF-based scheduled trigger is used to regularly trigger the ADF-based pipeline U01_ArchiveTaskExecution at 20:00 every Sunday to archive the table TaskExecution in the ADF metabase ADF_SchProcFwk, and migrate the logs from TaskExecution 7 days ago to the table TaskExecution_HIS. This function is encapsulated in the stored procedure P_ArchiveTaskExecution of the ADF metabase ADF_SchProcFwk and called by the pipeline U01_ArchiveTaskExecution in ADF.

[0097] In a specific embodiment, during the scheduling process, data is also protected by a password, and the specific steps are:

[0098] Azure KeyVault is used to store passwords for ETL accounts of databases including data warehouse database, unified scheduling management mechanism library, and metadata library.

[0099] During unified scheduling, when the data warehouse database, unified scheduling management mechanism library, and metadata library are needed, ADF calls KeyVault to obtain the password of the corresponding ETL dedicated account and passes it to the corresponding link service.

[0100] In this embodiment, during the whole process, only users with permission to access KeyVault will know the password, so as to protect the password from appearing in the ADF-based code project and not showing the password to the task developer. At the same time, if the password needs to be modified, the corresponding value of KeyVault can be modified, and the program code based on ADF does not need to be modified.

[0101] In this embodiment, the most fine-grained task in the task configuration table is the table-level task, and the uniqueness of the task is determined by the task ID; if the same table is combed multiple times, the tasks can be distinguished according to _ADF00, _ADF01 or different task types. Task types are divided into full data replication, script call, SSIS call, model processing, stored procedure call, etc. You can use the task configuration template to fill in the contents of each column according to the Excel cell, and the task insert statement of the taskConfig table will be automatically formed.

[0102] For a full copy task, that is, the FullDataCopy type:

[0103] SourceServer: can be ODS or DW database;

[0104] SinkServer: can only be a DW database;

[0105] If all associated tables are ODS tables, you can directly generate DIM, DWM, and DWS tables;

[0106] If the associated table is in ODS, not DW database, you need to add DWD table tasks;

[0107] Pay special attention to whether the PreRunScript field is correct.

[0108] Among them, for calling scripts, that is, RunScript type:

[0109] SinkServer can only be a DW database.

[0110] For calling SSIS, that is, RunSSIS type:

[0111] Sourceserver and sinkserver are fixed and their names do not need to be changed;

[0112] The connection manager needs to be project-level;

[0113] Just configure the package path for the location of SqlqQerySrting;

[0114] For the processing model, that is, the ProcessingCube_SSIS type:

[0115] Model processing tasks depend on whether the SinkServer is mainly developed by Dev or Prd production environment;

[0116] When running through managed ADF, the connection manager needs to be at the package level;

[0117] Use SinkChema to store the connection manager name; it is a fixed parameter and does not need to be modified;

[0118] Just configure the package path for the location of SqlQuerySrting;

[0119] For calling stored procedures:

[0120] For processing complex logical applications stored procedure processing;

[0121] If you need parameter fields, use the parmsettings field:

[0122] For parameter writing, please refer to: { "ID": { "value": "5", "type": "Int64"}, "Name": { "value": "scsdcsd", "type": "String"};

[0123] In this embodiment, the task configuration template can also be used to construct a dependency configuration table, and the contents of each column are filled in according to the Excel cells to automatically form the dependency executable statements of the TaskDependencies table, where:

[0124] Dependency on ODS: Configure the table name of ODS (such as interface table, manual table);

[0125] Dependency on DW: Configure the DW task ID (e.g. manual table);

[0126] Depends on NotFwkPL: configures the dependent pipeline name;

[0127] Dependency MODEL: The name of the model that the configuration depends on;

[0128] In this embodiment, in order to unify and standardize management and avoid generating too many non-standard task pipelines, Azure Data Factories (ADF) encapsulates universal task pipelines according to different data source types to adapt to different task types. Currently, five types are encapsulated, as follows:

[0129] SQL SERVER: used to execute synchronization tasks whose data source is the SQLSERVER database type;

[0130] MYSQL: used to execute synchronization tasks whose data source is MYSQL database type;

[0131] ORACLE: used to execute synchronization tasks whose data source is the ORACLE database type;

[0132] ODBC: used to execute synchronization tasks when the data source is of ODBC type;

[0133] ADB, or DATABRICKS: used to execute synchronization tasks where the data source is of the DATABRICKS type;

[0134] In a specific embodiment, when polling the task execution table through the task polling pipeline, the tasks of the daily batch and the micro batch can be polled;

[0135] For daily batch tasks, the ADF judger is used to determine whether the number of running tasks is less than the maximum number of concurrent tasks allowed. If so, the list of currently executable tasks is obtained;

[0136] For micro-batch tasks, the ADF judge is used to determine whether the number of running tasks is less than the maximum number of concurrent tasks allowed. If so, it is further determined whether there are tasks in the task execution table or the downstream DW has unfinished tasks before the current batch. If so, the unfinished task group in the task group in the task execution table is first obtained, and then the current batch is obtained; otherwise, the current executable task list of the current task group is obtained.

[0137] Example 3

[0138] like Figure 3 As shown, a unified scheduling system for enterprise-level data warehouse operations based on ADF includes a cascaded task generation module, a task polling module, a task distribution module, and a task work module;

[0139] The task generation module is used to insert the tasks to be executed on the day into the task execution table;

[0140] The task polling module is used to poll the task execution table until the execution status of all tasks in the task execution table is completed; obtain the number of tasks being run and the maximum number of concurrent tasks in the database; obtain the currently runnable task list, so that the tasks in the currently runnable task list meet the dependency conditions and the number of tasks being run does not exceed the maximum number of concurrent tasks;

[0141] In this embodiment, polling is divided into daily batches and micro batches;

[0142] For daily batch tasks, it is necessary to consider the demand distribution of tasks FeqCD = daily demand D, monthly demand M, quarterly demand Q, and annual demand Y; use the ADF judger to determine whether the number of running tasks is less than the maximum number of concurrent tasks allowed to be executed. If so, obtain the current list of executable tasks;

[0143] For micro-batch tasks, it is necessary to consider the demand distribution of the task FeqCD = daily demand D - cumulative supply and demand difference MT; use the ADF judge to determine whether the number of running tasks is less than the maximum number of concurrent tasks allowed to be executed. If so, further determine whether there are tasks in the task execution table or the downstream DW has unfinished tasks before the current batch. If so, first obtain the unfinished task group in the task group in the task execution table, and then obtain the current batch; otherwise, obtain the current executable task list of the current task group.

[0144] The task distribution module is used to obtain specific task information of tasks in the currently executable task list; and distribute tasks according to the specific task information of the tasks;

[0145] The task work module is used to execute the distributed tasks.

[0146] Obviously, the above embodiments of the present invention are only examples for clearly explaining the present invention, and are not intended to limit the implementation methods of the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention shall be included in the protection scope of the claims of the present invention.

Claims

1. A unified scheduling method for enterprise-level data warehouse operations based on ADF, characterized by: The specific steps include: Use ADF-based planning triggers to regularly trigger ADF-based task generation pipelines; ADF-based task generation pipeline executes stored procedures to generate task execution tables from the task configuration tables in the ADF metadata database according to specified rules; According to the priority of the task, insert the tasks that need to be executed on that day into the task execution table; Poll the task execution table until the execution status of all tasks in the task execution table is completed; obtain the number of running tasks and the maximum number of concurrent tasks in the database; obtain the currently executable task list, so that the tasks in the currently executable task list meet the dependency conditions and the number of running tasks does not exceed the maximum number of concurrent tasks; When polling the task execution table, you can poll daily batches and micro batches of tasks; For daily batch tasks, the ADF judger is used to determine whether the number of running tasks is less than the maximum number of concurrent tasks allowed. If so, the list of currently executable tasks is obtained; For micro-batch tasks, the ADF judger is used to determine whether the number of running tasks is less than the maximum number of concurrent tasks allowed. If so, it is further determined whether there are tasks in the task execution table or the downstream DW has unfinished tasks before the current batch. If so, the unfinished task group in the task execution table is first obtained, and then the current batch is obtained; otherwise, the current executable task list of the current task group is obtained; Get the specific task information of the task in the currently executable task list; distribute the task according to the specific task information of the task; Execute the distributed tasks.

2. The unified scheduling method for enterprise-level data warehouse operations based on ADF according to claim 1 is characterized in that: Poll the task execution table until the execution status of all tasks in the task execution table is completed; the specific steps are: Use ADF-based scheduled triggers to trigger ADF-based task polling pipelines; Through the task polling pipeline based on ADF, the number of running tasks, the maximum number of concurrent tasks, and task dependencies in the metadata database are obtained from the task execution table, parallel task table, and task dependency table of the ADF metadata database, and the task execution table is polled; Use the ADF judger to determine whether the number of running tasks is less than the maximum number of concurrent tasks allowed: If yes, then the task polling pipeline based on ADF is used to obtain the currently executable task list according to the task status of the ODS table provided by the unified scheduling management mechanism library, the running status of the marketing pipeline, and the task status of the task execution table, combined with the task dependency table; If not, after waiting for a certain period of time, re-determine whether the number of running tasks is less than the maximum number of concurrent tasks allowed.

3. The unified scheduling method for enterprise-level data warehouse operations based on ADF according to claim 1 is characterized in that: Get the specific task information of the task in the currently executable task list; distribute the task according to the specific task information of the task. The specific steps are as follows: Adopt the task detail information acquisition pipeline based on ADF, and use the query component in ADF to obtain the specific task information of the tasks in the currently executable task list based on the incoming task list using structured query language; The ADF-based task distribution pipeline distributes tasks according to the task type information in the specific task information of the task.

4. The unified scheduling method for enterprise-level data warehouse operations based on ADF according to claim 1 is characterized in that: The distribution task is executed through the task execution pipeline based on ADF; the task execution pipeline is a general task pipeline that encapsulates multiple task pipelines, including: full replication, incremental replication, script execution, SSIS execution, stored procedure, processing model, databricks, API, and custom management.

5. The unified scheduling method for enterprise-level data warehouse operations based on ADF according to claim 2 is characterized in that: Before triggering the ADF-based task generation pipeline, an ADF-based scheduled trigger is also used to regularly trigger the ADF-based backup pipeline to perform key table backup jobs, and back up the task configuration table TaskConfig, task dependency table, and linked service information table in the ADF metadata database to Blob storage.

6. The unified scheduling method for enterprise-level data warehouse operations based on ADF according to claim 5 is characterized in that: ADF-based plan trigger is also used to regularly trigger the ADF-based task execution table archiving pipeline to archive the task execution table in the ADF metadata database, and migrate the logs within the set period from the task execution table to the task execution history table.

7. The unified scheduling method for enterprise-level data warehouse operations based on ADF according to claim 1 is characterized in that: During the scheduling process, the data is also protected by passwords. The specific steps are as follows: Azure KeyVault is used to store passwords for databases including the data warehouse database, unified scheduling management mechanism library, and metadata library. During unified scheduling, when the data warehouse database, unified scheduling management mechanism library, and metadata library are needed, ADF calls KeyVault to obtain the corresponding password and passes it to the corresponding link service.

8. A unified scheduling system for enterprise-level data warehouse operations based on ADF, characterized by: Used to implement the unified scheduling method described in any one of claims 1 to 7, comprising a cascaded task generation module, a task polling module, a task distribution module, and a task work module; The task generation module is used to insert the tasks to be executed on the day into the task execution table; The task polling module is used to poll the task execution table until the execution status of all tasks in the task execution table is completed; obtain the number of tasks being run and the maximum number of concurrent tasks in the database; obtain the currently runnable task list, so that the tasks in the currently runnable task list meet the dependency conditions and the number of tasks being run does not exceed the maximum number of concurrent tasks; The task distribution module is used to obtain specific task information of tasks in the currently executable task list; and distribute tasks according to the specific task information of the tasks; The task work module is used to execute the distributed tasks.