WO2019223181A1 - Etl任务数据源切换方法、系统、计算机设备和存储介质 - Google Patents

Etl任务数据源切换方法、系统、计算机设备和存储介质 Download PDF

Info

Publication number
WO2019223181A1
WO2019223181A1 PCT/CN2018/104707 CN2018104707W WO2019223181A1 WO 2019223181 A1 WO2019223181 A1 WO 2019223181A1 CN 2018104707 W CN2018104707 W CN 2018104707W WO 2019223181 A1 WO2019223181 A1 WO 2019223181A1
Authority
WO
WIPO (PCT)
Prior art keywords
data source
database
data
api server
library
Prior art date
Application number
PCT/CN2018/104707
Other languages
English (en)
French (fr)
Inventor
刘斌
袁贺强
Original Assignee
平安科技(深圳)有限公司
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2019223181A1 publication Critical patent/WO2019223181A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • the present application relates to the field of computer technology, and in particular, to an ETL task data source switching method, system, computer device, and storage medium.
  • COW Copy-On-Write
  • ETL Extract-Transform-Load
  • ETL is used to describe the process of extracting, transforming, and loading data from the source to the destination.
  • ETL is commonly used in data warehouses.
  • ETL tasks are mainly targeted at OLAP-type BI projects.
  • Data is generally extracted from business-oriented OLTP databases. The main features are large data volume and long processing time. Generally, the processing time period is mostly concentrated in the early morning when the OLTP database has less pressure, but the following problems exist:
  • An ETL task data source switching method includes:
  • mapping table and a data source configuration table are preset in a server configuration library where the ETL task runs, the mapping table includes a production library and a COW library, and the production library connection string and the COW library connection string in the mapping table One-to-one correspondence, the connection data in the data source configuration table includes a connection string;
  • the SHELL script encapsulates a CURL command that calls an API server, uses the CURL name to call the API server, and detects and modifies the connection string in the configuration database through the API server;
  • a database table is set in the database of the API server, the database table contains the loading information and synchronization data information of the COW library, and the database is detected based on the data recorded in the database table to check whether the database has been loaded, and whether the data is synchronized to 0AM Point, the database is a database startup instance;
  • the server on which the ETL task runs reads the connection data in the data source configuration table, modifies the connection string in the data source configuration table, and automatically switches to the data source that requires operation.
  • An ETL task data source switching system includes:
  • the corresponding unit is set to preset a mapping table and a data source configuration table in a server configuration library where the ETL task runs, the mapping table includes a production library and a COW library, and the production library connection string in the mapping table and COW library connection strings have one-to-one correspondence, and the connection data in the data source configuration table includes connection strings;
  • the calling unit is set to call a SHELL script, which encapsulates a CURL command for calling an API server, uses the CURL name to call the API server, and detects and modifies the connection string in the configuration database through the API server;
  • the database synchronization unit is configured to set a database table in a database of the API server, where the database table includes the database loading information and synchronization data information of the COW library, and detects whether the database has been loaded according to the data recorded in the database table, and whether Synchronize data to 0am, the database is a database startup instance;
  • the switching unit is set to read the connection data in the data source configuration table, modify the connection string in the data source configuration table, and automatically switch to the required one after the API server confirms the library information and synchronization information.
  • the data source of the operation is set to read the connection data in the data source configuration table, modify the connection string in the data source configuration table, and automatically switch to the required one after the API server confirms the library information and synchronization information.
  • a computer device includes a memory and a processor.
  • the memory stores computer-readable instructions.
  • the processor causes the processor to perform the following steps:
  • mapping table and a data source configuration table are preset in a server configuration library where the ETL task runs, the mapping table includes a production library and a COW library, and the production library connection string and the COW library connection string in the mapping table One-to-one correspondence, the connection data in the data source configuration table includes a connection string;
  • the SHELL script encapsulates a CURL command that calls an API server, uses the CURL name to call the API server, and detects and modifies the connection string in the configuration database through the API server;
  • a database table is set in the database of the API server, the database table contains the loading information and synchronization data information of the COW library, and the database is detected based on the data recorded in the database table to check whether the database has been loaded, and whether the data is synchronized to 0AM Point, the database is a database startup instance;
  • the server on which the ETL task runs reads the connection data in the data source configuration table, modifies the connection string in the data source configuration table, and automatically switches to the data source that requires operation.
  • a storage medium storing computer-readable instructions.
  • the one or more processors execute the following steps:
  • mapping table and a data source configuration table are preset in a server configuration library where the ETL task runs, the mapping table includes a production library and a COW library, and the production library connection string and the COW library connection string in the mapping table One-to-one correspondence, the connection data in the data source configuration table includes a connection string;
  • a database table is set in the database of the API server, the database table contains the loading information and synchronization data information of the COW library, and the database is detected based on the data recorded in the database table to check whether the database has been loaded, and whether the data is synchronized to 0AM Point, the database is a database startup instance;
  • the server on which the ETL task runs reads the connection data in the data source configuration table, modifies the connection string in the data source configuration table, and automatically switches to the data source that requires operation.
  • the foregoing ETL task data source switching method, system, computer equipment, and storage medium are prepared by presetting a mapping table and a data source configuration table in a server configuration library where the ETL task is running.
  • the mapping table includes a production library and a COW library. There is a one-to-one correspondence between the production library connection string and the COW library connection string in the mapping table.
  • the connection data in the data source configuration table includes the connection string, and the SHELL script is invoked.
  • the SHELL script encapsulates a call to the API server.
  • the CURL command uses the CURL name to call the API server, detects and modifies the connection string in the configuration database through the API server, and sets a database table in the database of the API server.
  • the database table contains the starting information and synchronization data information of the COW library. Detect whether the database is started according to the data recorded in the database table, and whether to synchronize the data to 0am.
  • the start of the database is a database startup instance.
  • the API server confirms the information of the database and the synchronization information
  • the ETL task runs.
  • the server where it is located reads the connection data in the data source configuration table and modifies the data in the data source configuration table.
  • the connection string automatically switches to the data source that needs to be operated, which reduces the risk of manual operation, improves the switching efficiency, and reduces misoperations.
  • FIG. 1 is a flowchart of an ETL task data source switching method according to an embodiment
  • FIG. 2 is a flowchart of detecting and modifying a connection string in a configuration library according to an embodiment
  • FIG. 3 is a structural block diagram of an ETL task data source switching system according to an embodiment
  • FIG. 4 is a structural block diagram of a calling unit in an embodiment.
  • an ETL task data source switching method includes the following steps:
  • a mapping table and a data source configuration table are preset in a server configuration library where the ETL task runs.
  • the mapping table includes a production library and a COW library, and the production library connection string and the COW library connection string in the mapping table are stored.
  • the connection data in the data source configuration table includes a connection string;
  • ETL Extract-Transform-Load
  • ETL is used to describe the process of extracting, transforming, and loading data from the source to the destination.
  • ETL is commonly used in data warehouses.
  • ETL is an important part of building a data warehouse. The user extracts the required data from the data source, and after data cleaning, finally loads the data into the data warehouse according to a predefined data warehouse model.
  • Data is generally extracted from business-oriented OLTP databases. Use relational database to store and manage business data, and establish corresponding application systems to support daily business operations. This application has the main purpose of supporting business processing. It is called online transaction processing (OLTP) application, and the data it stores is called operation data or business data.
  • OLTP online transaction processing
  • COW Copy-On-Write
  • a mapping table is set in the server configuration library in advance, and the production database connection string and the COW library connection string are entered on the mapping table, and one of them is corresponding, so that Configure the correspondence between the production library and the backup COW library, as shown in Table 1 below:
  • SID also known as Security Identifiers
  • SID is a unique number that identifies users, groups, and computer accounts.
  • SID is the SID of the data source, which is a unique identifier of a database, that is, an initial ID automatically assigned by the system when a database is established.
  • JDBC_STR_COW and JDBC_STR_PRD represent the connection string of the COW library and the connection string of the production library, respectively.
  • step S102 a SHELL script is invoked, and the SHELL script encapsulates a CURL command that calls an API server, uses the CURL name to call the API server, and detects and modifies the connection string in the configuration database through the API server;
  • SHELL script is similar to batch processing under Windows / Dos. It is a program written using the function of SHELL. This program uses a plain text file, writes some SHELL syntax and instructions in it, and then uses regular notation, pipe commands, and Data stream redirection and other functions.
  • a crontab expression is set by a program.
  • the crontab expression includes two parts, one is a point in time and the other is the name of the script to be executed at that point in time.
  • the script name is set to call the crontab expression to be executed periodically.
  • the script is a shell script.
  • the shell script encapsulates a CURL command that calls an API.
  • the CURL command is a tool on the operating system Linux. It can initiate HTTP requests through the command line and then call the API server. After calling the CURL command to call the API, the API server detects and modifies the connection string in the configuration database.
  • a database table is set in the database of the API server.
  • the database table contains the loading information and synchronization data information of the COW library, and detects whether the database has been loaded according to the data recorded in the database table, and whether the data is synchronized to 0 AM.
  • the database is the database startup instance;
  • a database table is set in the database of the API server.
  • the data administrator records the starting information and synchronization data information of the COW library in the database table.
  • the data recorded in the database table is used to detect whether the database has been stored in the database, and whether the data has been synchronized to 0am, and confirm the database information and synchronization information in the API server for data source switching.
  • Step S104 after the API server confirms the library information and synchronization information, the server on which the ETL task runs reads the connection data in the data source configuration table, modifies the connection string in the data source configuration table, and automatically switches to the one that needs to be operated data source.
  • connection string Modify the connection string to automatically switch the data source.
  • a data source configuration table is set.
  • the server on which the ETL task is running will read the connection data in the data source configuration table for connecting to the database.
  • the connection data in the data source configuration table includes a data source name, a security identifier (SID), a database user name password, and a connection string.
  • step S103 after detecting the library information and synchronization information in the API server, through the PYTHON program, use the cx_Oracle package in the PYTHON program to connect to the configuration library and execute the UPDATE statement to modify the connection string in the data source configuration table. Therefore, the database connected when the ETL task is running is changed automatically.
  • the data source configuration table is shown in the following table:
  • the data source configuration table is configured with data such as the data source name, SID, database username and password, and connection string (JDBC_STR).
  • the COW library is a backup library of the production library. It has the same user password. The difference is that the connection string is different. Therefore, only the connection string field needs to be modified to automatically switch the data source.
  • connection data in the data source configuration table further includes a data source name, a security identifier, a database user name, and a password.
  • a data source configuration table is set.
  • the server on which the ETL task is running will read the connection data in the data source configuration table for connecting to the database.
  • the connection data in the data source configuration table includes a data source name, a security identifier (SID), a database user name password, and a connection string.
  • a shell script is invoked.
  • the shell script encapsulates a CURL command that calls an API server, uses the CURL name to call the API server, and detects and modifies the connection string in the configuration database through the API server.
  • a CRONTAB expression is set on the server through a program.
  • the expression includes a time point and a script name to be executed at a time point, and a SHELL script that needs to be executed periodically is set by setting a script name of the CRONTAB expression;
  • a CRONTAB expression is set through a program.
  • the CRONTAB expression includes two parts, one is a point in time and the other is the name of the script that needs to be executed at that point in time.
  • the script name is set to call the CRONTAB expression to be executed periodically.
  • the script is a shell script.
  • the shell script encapsulates a CURL command that calls an API.
  • the CURL command is a tool on the operating system Linux. It can initiate HTTP requests through the command line and then call the API server. After calling the CURL command to call the API, the API server detects and modifies the connection string in the configuration database.
  • step S202 the SHELL script encapsulates a CURL command for invoking the API server, and the CURL command initiates an HTTP request through the command line, and then calls the API server;
  • the SHELL script encapsulates a CURL command that calls an API.
  • the CURL command is a tool on the operating system Linux. It can initiate HTTP requests through the command line and then call the API server.
  • Step S203 Detect and modify the connection string in the configuration database through the API server.
  • the API server After calling the CURL command to call the API, the API server detects and modifies the connection string in the configuration database.
  • the server on which the ETL task runs reads the connection data in the data source configuration table, modifies the connection string in the data source configuration table, and automatically switches to
  • the data sources that need to be operated include:
  • the server on which the ETL task is running reads the connection data in the data source configuration table
  • the server on which the ETL task is running reads the connection data in the data source configuration table.
  • the Oracle package in the program connects to the server configuration library, executes the UPDATE statement, modifies the connection string in the data source configuration table, changes the database connected when the ETL task runs, and automatically switches the data source.
  • the method further includes:
  • a work log is set in the database of the API server.
  • the work log is set to monitor whether the data source is successfully switched. If the data source is not successfully switched, an alarm is sent to notify the user.
  • the alerts include phone alerts and email notifications.
  • a work log is also set, and the work log is set to record whether the data source in step 4) is successfully switched.
  • a monitoring platform On the outside of the server, a monitoring platform is provided.
  • the monitoring platform is configured with a database of an API server to be monitored, a SQL statement to monitor execution, a contact person, a mail group, and the time and frequency of monitoring execution.
  • the monitoring platform connects to the data in the database according to the frequency of monitoring and execution, and executes SQL statements, which are set to detect the work log data of the data source automatic switching and determine whether the data source has been automatically switched. Set the execution time of monitoring to be slightly later than the time of calling the API server.
  • the monitoring platform After monitoring and executing the SQL statement to detect the work log data of the automatic data source switching, it is determined whether the data source is successfully switched according to the data information. If the data source is not successfully switched, the monitoring platform phone alarms and emails are sent to the corresponding operation and maintenance personnel and data administrators. The data administrator checks the warehouse information and synchronization information in the database of the API server, determines the cause, and handles it. After completion, call the API server again to automatically switch the data source.
  • an ETL task data source switching system includes:
  • the corresponding unit is set to preset a mapping table and a data source configuration table in a server configuration library where the ETL task runs, the mapping table includes a production library and a COW library, and the production library connection string in the mapping table and COW library connection strings have one-to-one correspondence, and the connection data in the data source configuration table includes connection strings;
  • the calling unit is set to call a SHELL script, which encapsulates a CURL command for calling an API server, uses the CURL name to call the API server, and detects and modifies the connection string in the configuration database through the API server;
  • the database synchronization unit is configured to set a database table in a database of the API server, where the database table includes the database loading information and synchronization data information of the COW library, and detects whether the database has been loaded according to the data recorded in the database table, and whether Synchronize data to 0am, the database is a database startup instance;
  • the switching unit is set to read the connection data in the data source configuration table, modify the connection string in the data source configuration table, and automatically switch to the required one after the API server confirms the library information and synchronization information.
  • the data source of the operation is set to read the connection data in the data source configuration table, modify the connection string in the data source configuration table, and automatically switch to the required one after the API server confirms the library information and synchronization information.
  • connection data in the data source configuration table further includes a data source name, a security identifier, a database user name, and a password.
  • the calling unit includes:
  • a setting module configured to set a CRONTAB expression on a server through a program, the expression including a time point and a script name to be executed at the time point, and calling a SHELL script to be executed periodically by setting a script name of the CRONTAB expression;
  • An invocation module configured to encapsulate the shell script with a CURL command for invoking an API server, where the CURL command initiates an HTTP request through a command line, and then calls the API server;
  • Detection module configured to detect and modify the connection string in the configuration library through the API server.
  • the switching unit includes:
  • the reading module is set to read the connection data in the data source configuration table of the server where the ETL task runs when the API server confirms the library information and synchronization information;
  • Modify the module set the server where the ETL task is running to connect to the server configuration library through the Oracle package in the PYTHON program, execute the UPDATE statement, modify the connection string in the data source configuration table, and change the database to which the ETL task runs , Automatically switch the data source.
  • the ETL task data source switching system further includes a monitoring unit configured to set a work log in the database of the API server after the server on which the ETL task is running automatically switches to a data source that needs to be operated.
  • the work log is set to monitor whether the data source is successfully switched. If the data source is not successfully switched, an alarm is issued to notify the user.
  • the alerts include phone alerts and email notifications.
  • a computer device in one embodiment, includes a memory and a processor.
  • the memory stores computer-readable instructions.
  • the processor causes the processor to execute the computer program.
  • a storage medium storing computer-readable instructions.
  • the computer-readable instructions are executed by one or more processors, the one or more processors are caused to perform the ETL tasks in the foregoing embodiments. Steps in a data source switching method.
  • the storage medium may be a non-volatile storage medium.
  • the program may be stored in a computer-readable storage medium.
  • the storage medium may include: Read-only memory (ROM, Read Only Memory), random access memory (RAM, Random Access Memory), magnetic disks or optical disks, etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Stored Programmes (AREA)

Abstract

一种ETL任务数据源切换方法、系统、计算机设备和存储介质,其中所述方法包括:在ETL任务运行时所在的服务器配置库中预置映射表和数据源配置表,将所述映射表中的生产库连接字符串和COW库连接字符串一一对应(S101);调用SHELL脚本,通过API服务器检测和修改配置库中的连接字符串(S102);在API服务器的数据库中设置数据库表,根据所述数据库表中记录的数据检测数据库是否起库,以及是否将数据同步到凌晨时间0点(S103);在API服务器确认起库信息和同步信息后,修改数据源配置表中的连接字符串,自动切换到需要操作的数据源(S104)。上述方法降低了人工操作的风险,提高了切换效率,减少了误操作。

Description

ETL任务数据源切换方法、系统、计算机设备和存储介质
本申请要求于2018年05月21日提交中国专利局、申请号为201810486101.2、发明名称为“ETL任务数据源切换方法、系统、计算机设备和存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及计算机技术领域,尤其涉及一种ETL任务数据源切换方法、系统、计算机设备和存储介质。
背景技术
利用关系型数据库来存储和管理业务数据,并建立相应的应用系统来支持日常的业务运作。这种应用以支持业务处理为主要目的,被称为联机事务处理(On line Transaction Processing,OLTP)应用,它所存储的数据被称为操作数据或者业务数据。BI(Business Intelligence)是一种运用了数据仓库,在线分析和数据挖掘等技术来处理和分析数据的崭新技术,目的是为企业决策者提供决策支持。COW(写时复制Copy-On-Write),是存储快照的一种方式,更新源数据卷中的原始数据时,将原始数据Copy到快照卷中。当我们需要恢复快照时,只需要按照快照指针表逐一进行寻址就能够完成了,而且COW在使用上非常的灵活,可以随时为任意源数据卷建立快照。
ETL(Extract-Transform-Load),用来描述将数据从来源端经过抽取(extract)、转换(transform)、加载(load)至目的端的过程,ETL常用在数据仓库。ETL任务主要是针对OLAP型的BI项目。一般是从业务型的OLTP型数据库中抽取数据。主要特点是数据量大,处理时间长。一般处理的时间段大都是集中在OLTP数据库压力较小的凌晨,但存在如下问题:
1、部分抽数任务由于依赖任务多或者报错等原因,运行时间排到了白天上班时间。而在上班时间对OLTP型的数据库进行大数据量长时间的抽取,对数据库IO(数据库文件的读写,即检索数据和插入数据)和性能造成了很大影响。
2、一般采取人工从备份COW库取数方式解决上述问题,但人工切换方式易产生操作失误,且增加了不必要的人力。
发明内容
基于此,有必要针对现行ETL任务数据源切换方法,大数据量长时间的抽取,对数据库文件的读取和性能造成了很大影响,人工切换方式易产生操作失误的弊端,提供一种ETL任务数据源切换方法、系统、计算机设备和存储介质。
一种ETL任务数据源切换方法,包括:
在ETL任务运行时所在的服务器配置库中预置映射表和数据源配置表,所述映射表包括生产库和COW库,将所述映射表中的生产库连接字符串和COW库连接字符串一一对应,所述数据源配置表中的连接数据包括连接字符串;
调用SHELL脚本,所述SHELL脚本封装有调用API服务器的CURL命令,利用CURL命名调用API服务器,通过API服务器检测和修改配置库中的连接字符串;
在API服务器的数据库中设置数据库表,所述数据库表包含COW库的起库信息和同步数据信息,根据所述数据库表中记录的数据检测数据库是否起库,以及是否将数据同步到凌晨时间0点,所述起库是数据库启动实例;
在API服务器确认起库信息和同步信息后,ETL任务运行时所在的服务器读取数据源配置表中的连接数据,修改数据源配置表中的连接字符串,自动切换到需要操作的数据源。
一种ETL任务数据源切换系统,包括:
对应单元,设置为在ETL任务运行时所在的服务器配置库中预置映射表和数据源配置表,所述映射表包括生产库和COW库,将所述映射表中的生产库连接字符串和COW库连接字符串一一对应,所述数据源配置表中的连接数据包括连接字符串;
调用单元,设置为调用SHELL脚本,所述SHELL脚本封装有调用API服务器的CURL命令,利用CURL命名调用API服务器,通过API服务器检测和修改配置库中的连接字符串;
起库同步单元,设置为在API服务器的数据库中设置数据库表,所述数据库表包含COW库的起库信息和同步数据信息,根据所述数据库表中记录的数据检测数据库是否起库,以及是否将数据同步到凌晨时间0点,所述起库是数据库启动实例;
切换单元,设置为在API服务器确认起库信息和同步信息后,ETL任务运行时所在的服务器读取数据源配置表中的连接数据,修改数据源配置表中的连接字符串,自动切换到需要操作的数据源。
一种计算机设备,包括存储器和处理器,所述存储器中存储有计算机可读指令,所述计算机可读指令被所述处理器执行时,使得所述处理器执行以下步骤:
在ETL任务运行时所在的服务器配置库中预置映射表和数据源配置表,所述映射表包括生产库和COW库,将所述映射表中的生产库连接字符串和COW库连接字符串一一对应,所述数据源配置表中的连接数据包括连接字符串;
调用SHELL脚本,所述SHELL脚本封装有调用API服务器的CURL命令,利用CURL命名调用API服务器,通过API服务器检测和修改配置库中的连接字符串;
在API服务器的数据库中设置数据库表,所述数据库表包含COW库的起库信息和同步数据信息,根据所述数据库表中记录的数据检测数据库是否起库,以及是否将数据同步到凌晨时间0点,所述起库是数据库启动实例;
在API服务器确认起库信息和同步信息后,ETL任务运行时所在的服务器读取数据源配置表中的连接数据,修改数据源配置表中的连接字符串,自动切换到需要操作的数据源。
一种存储有计算机可读指令的存储介质,所述计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行以下步骤:
在ETL任务运行时所在的服务器配置库中预置映射表和数据源配置表,所述映射表包括生产库和COW库,将所述映射表中的生产库连接字符串和COW库连接字符串一一对应,所述数据源配置表中的连接数据包括连接字符串;
调用SHELL脚本,所述SHELL脚本封装有调用API服务器的CURL命令,利 用CURL命名调用API服务器,通过API服务器检测和修改配置库中的连接字符串;
在API服务器的数据库中设置数据库表,所述数据库表包含COW库的起库信息和同步数据信息,根据所述数据库表中记录的数据检测数据库是否起库,以及是否将数据同步到凌晨时间0点,所述起库是数据库启动实例;
在API服务器确认起库信息和同步信息后,ETL任务运行时所在的服务器读取数据源配置表中的连接数据,修改数据源配置表中的连接字符串,自动切换到需要操作的数据源。
上述ETL任务数据源切换方法、系统、计算机设备和存储介质,通过在ETL任务运行时所在的服务器配置库中预置映射表和数据源配置表,所述映射表包括生产库和COW库,将所述映射表中的生产库连接字符串和COW库连接字符串一一对应,所述数据源配置表中的连接数据包括连接字符串,调用SHELL脚本,所述SHELL脚本封装有调用API服务器的CURL命令,利用CURL命名调用API服务器,通过API服务器检测和修改配置库中的连接字符串,在API服务器的数据库中设置数据库表,所述数据库表包含COW库的起库信息和同步数据信息,根据所述数据库表中记录的数据检测数据库是否起库,以及是否将数据同步到凌晨时间0点,所述起库是数据库启动实例,在API服务器确认起库信息和同步信息后,ETL任务运行时所在的服务器读取数据源配置表中的连接数据,修改数据源配置表中的连接字符串,自动切换到需要操作的数据源,降低了人工操作的风险,提高了切换效率,减少了误操作。
附图说明
通过阅读下文优选实施方式的详细描述,各种其他的优点和益处对于本领域普通技术人员将变得清楚明了。附图仅用于示出优选实施方式的目的,而并不认为是对本申请的限制。
图1为一个实施例中ETL任务数据源切换方法的流程图;
图2为一个实施例中检测和修改配置库中的连接字符串的的流程图;
图3为一个实施例中ETL任务数据源切换系统的结构框图;
图4为一个实施例中调用单元的结构框图。
具体实施方式
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
本技术领域技术人员可以理解,除非特意声明,这里使用的单数形式“一”、“一个”、“所述”和“该”也可包括复数形式。应该进一步理解的是,本申请的说明书中使用的措辞“包括”是指存在所述特征、整数、步骤、操作、元件和/或组件,但是并不排除存在或添加一个或多个其他特征、整数、步骤、操作、元件、组件和/或它们的组。
作为一个较好的实施例,如图1所示,一种ETL任务数据源切换方法,该ETL任务数据源切换方法包括以下步骤:
步骤S101,在ETL任务运行时所在的服务器配置库中预置映射表和数据源配置表,映射表包括生产库和COW库,将映射表中的生产库连接字符串和COW库连接字符串一一对应,数据源配置表中的连接数据包括连接字符串;
ETL任务主要是针对OLAP型的BI项目。ETL(Extract-Transform-Load),用来描述将数据从来源端经过抽取(extract)、转换(transform)、加载(load)至目的端的过程,ETL常用在数据仓库。ETL是构建数据仓库的重要一环,用户从数据源抽取出所需的数据,经过数据清洗,最终按照预先定义好的数据仓库模型,将数据加载到数据仓库中去。一般是从业务型的OLTP型数据库中抽取数据。利用关系型数据库来存储和管理业务数据,并建立相应的应用系统来支持日常的业务运作。这种应用以支持业务处理为主要目的,被称为联机事务处理(On line Transaction Processing,OLTP)应用,它所存储的数据被称为操作数据或者业务数据。BI(Business Intelligence)是一种运用了数据仓库,在线分析和数据挖掘等技术来处理和分析数据的崭新技术,目的是为企业决策者提供决策支持。COW(写时复制Copy-On-Write),是存储快照的一种方式,更新源数据卷中的原始数据时,将原始数据Copy到快照卷中。当我们需要恢复快照时, 只需要按照快照指针表逐一进行寻址就能够完成了,而且COW在使用上非常的灵活,可以随时为任意源数据卷建立快照。
配置生产库与备份COW库间的对应关系。在一选定的Linux客户端,在其服务器的配置库中,事先设置一映射表,在所述映射表上录入生产库连接字符串和COW库连接字符串,并使之一一对应,从而配置生产库与备份COW库之间的对应关系,如下表1所示:
Figure PCTCN2018104707-appb-000001
表1
其中,SID也就是安全标识符(Security Identifiers),是标识用户、组和计算机帐户的唯一的号码。SID为数据源的SID,是一个数据库的唯一标识符,即在建立一个数据库时系统自动赋予的一个初始ID。JDBC_STR_COW和JDBC_STR_PRD分别表示COW库的连接字符串和生产库的连接字符串。
步骤S102,调用SHELL脚本,SHELL脚本封装有调用API服务器的CURL命令,利用CURL命名调用API服务器,通过API服务器检测和修改配置库中的连接字符串;
调用SHELL脚本,调用API服务器。API是Application Programming Interface(应用编程接口),使用的API接口会把参数消息传到给API服务器。API是Application Programming Interface(应用编程接口),使用的API接口会把参数消息传到给API服务器。SHELL脚本与Windows/Dos下的批处理相似,利用SHELL的功能所写的一个程序,这个程序是使用纯文本文件,将一些SHELL的语法与指令写在里面,然后用正规表示法,管道命令以及数据流重导向等功能。
在Linux服务器上,通过程序设置crontab表达式,该crontab表达式包 括两部分,一部分为时间点,一部分为所述时间点需要执行的脚本名称,通过设置CRONTAB表达式的脚本名称来调用需要定时执行的脚本SHELL脚本,所述SHELL脚本中封装有一调用API的CURL命令,所述CURL命令是操作系统Linux上的一个工具,可以通过命令行方式发起HTTP请求,进而调用API服务器。调用CURL命令来调用API后,经过API服务器来检测、修改配置库中的连接字符串。
步骤S103,在API服务器的数据库中设置数据库表,数据库表包含COW库的起库信息和同步数据信息,根据数据库表中记录的数据检测数据库是否起库,以及是否将数据同步到凌晨时间0点,起库是数据库启动实例;
检测COW库是否起库,是否已同步到凌晨时间0点:在API服务器的数据库中,设置有一数据库表,数据管理员将COW库的起库信息以及同步数据信息记录于该数据库表中,根据数据库表中记录的数据来检测数据库是否已经起库,是否已经将数据同步到凌晨时间0点,在API服务器中确认起库信息及同步信息以进行数据源切换。
步骤S104,在API服务器确认起库信息和同步信息后,ETL任务运行时所在的服务器读取数据源配置表中的连接数据,修改数据源配置表中的连接字符串,自动切换到需要操作的数据源。
修改连接字符串,实现数据源自动切换。在Linux服务器的配置库上,设置有一数据源配置表,ETL任务在运行时,ETL任务运行时所在的服务器会读取数据源配置表中的连接数据,用于连接数据库。所述数据源配置表中的连接数据包括数据源名称,安全标识符(SID),数据库用户名密码,以及连接字符串。
经上述步骤S103,在API服务器中检测通过起库信息以及同步信息后,通过PYTHON程序,利用PYTHON程序中的cx_Oracle包连接配置库,执行UPDATE语句,来修改数据源配置表中的连接字符串,从而改变ETL任务运行时所连接的数据库,进行数据源的自动切换。
所述数据源配置表如下表所示:
Figure PCTCN2018104707-appb-000002
Figure PCTCN2018104707-appb-000003
如上表所示,数据源配置表中配置有数据源名称,SID,数据库用户名密码,以及连接字符串(JDBC_STR)等数据。COW库是生产库的备份库,具有相同的用户密码,区别在于连接字符串不同,故只需修改其中的连接字符串字段即可实现数据源的自动切换。
在一个实施例中,数据源配置表中的连接数据还包括数据源名称、安全标识符、数据库用户名及密码。
在Linux服务器的配置库上,设置有一数据源配置表,ETL任务在运行时,ETL任务运行时所在的服务器会读取数据源配置表中的连接数据,用于连接数据库。所述数据源配置表中的连接数据包括数据源名称,安全标识符(SID),数据库用户名密码,以及连接字符串。
如图2所示,在一个实施例中,调用SHELL脚本,SHELL脚本封装有调用API服务器的CURL命令,利用CURL命名调用API服务器,通过API服务器检测和修改配置库中的连接字符串具体包括:
步骤S201,通过程序在服务器上设置CRONTAB表达式,表达式包括时间点和时间点需要执行的脚本名称,通过设置CRONTAB表达式的脚本名称来调用需要定时执行的SHELL脚本;
在Linux服务器上,通过程序设置CRONTAB表达式,该CRONTAB表达式包括两部分,一部分为时间点,一部分为所述时间点需要执行的脚本名称,通过设置CRONTAB表达式的脚本名称来调用需要定时执行的脚本SHELL脚本,所述SHELL脚本中封装有一调用API的CURL命令,所述CURL命令是操作系统Linux上的一个工具,可以通过命令行方式发起HTTP请求,进而调用API服务器。调用CURL命令来调用API后,经过API服务器来检测、修改配置库中的连接字符串。
步骤S202,SHELL脚本封装有调用API服务器的CURL命令,CURL命令通过命令行方式发起HTTP请求,进而调用API服务器;
SHELL脚本中封装有一调用API的CURL命令,所述CURL命令是操作系统Linux上的一个工具,可以通过命令行方式发起HTTP请求,进而调用API服务器。
步骤S203,通过API服务器检测和修改配置库中的连接字符串。
调用CURL命令来调用API后,经过API服务器来检测、修改配置库中的连接字符串。
在一个实施例中,在API服务器确认起库信息和同步信息后,ETL任务运行时所在的服务器读取数据源配置表中的连接数据,修改数据源配置表中的连接字符串,自动切换到需要操作的数据源具体包括:
在API服务器确认起库信息和同步信息后,ETL任务运行时所在的服务器读取数据源配置表中的连接数据,ETL任务运行时所在的服务器读取数据源配置表中的连接数据,通过PYTHON程序中的Oracle包连接服务器配置库,执行UPDATE语句,修改数据源配置表中的连接字符串,改变ETL任务运行时所连接的数据库,自动切换数据源。
在一个实施例中,自动切换到需要操作的数据源之后还包括:
在API服务器的数据库中设置工作日志,工作日志设置为监控记录数据源是否切换成功,若未成功切换则发出警报通知用户。
在一个实施例中,警报包括电话告警和电子邮件通知。
设置工作日志,并进行外部监控:在API服务器的数据库中,还设置有一工作日志,该工作日志设置为记录上述步骤4)中的数据源是否切换成功。
在服务器外端,设置一监控平台,所述监控平台配置有需要监控的API服务器的数据库、监控执行的SQL语句、监控联系人、邮件组以及监控执行的时间和频度。该监控平台按照监控执行的频率连接数据库中的数据,执行SQL语句,所述SQL语句设置为检测数据源自动切换的工作日志数据,确定数据源是否已自动切换。设置监控的执行时间点稍晚于调用API服务器的时间点。
经监控执行的SQL语句检测数据源自动切换的工作日志数据后,根据数据 信息来判断数据源是否切换成功。若数据源未成功切换,则通过监控平台电话告警及发送邮件给相应的运维人员和数据管理员,数据管理员查看API服务器的数据库中起库信息和同步信息,确定原因并进行处理,处理完成后再次调用API服务器进行数据源的自动切换。
如图3所示,在一个实施例中,提供一种ETL任务数据源切换系统,该切换系统包括:
对应单元,设置为在ETL任务运行时所在的服务器配置库中预置映射表和数据源配置表,所述映射表包括生产库和COW库,将所述映射表中的生产库连接字符串和COW库连接字符串一一对应,所述数据源配置表中的连接数据包括连接字符串;
调用单元,设置为调用SHELL脚本,所述SHELL脚本封装有调用API服务器的CURL命令,利用CURL命名调用API服务器,通过API服务器检测和修改配置库中的连接字符串;
起库同步单元,设置为在API服务器的数据库中设置数据库表,所述数据库表包含COW库的起库信息和同步数据信息,根据所述数据库表中记录的数据检测数据库是否起库,以及是否将数据同步到凌晨时间0点,所述起库是数据库启动实例;
切换单元,设置为在API服务器确认起库信息和同步信息后,ETL任务运行时所在的服务器读取数据源配置表中的连接数据,修改数据源配置表中的连接字符串,自动切换到需要操作的数据源。
在一个实施例中,所述数据源配置表中的连接数据还包括数据源名称、安全标识符、数据库用户名及密码。
如图4所示,在一个实施例中,所述调用单元包括:
设置模块,设置为通过程序在服务器上设置CRONTAB表达式,所述表达式包括时间点和所述时间点需要执行的脚本名称,通过设置CRONTAB表达式的脚本名称来调用需要定时执行的SHELL脚本;
调用模块,设置为所述SHELL脚本封装有调用API服务器的CURL命令,所述CURL命令通过命令行方式发起HTTP请求,进而调用API服务器;
检测模块,设置为通过API服务器检测和修改配置库中的连接字符串。
在一个实施例中,所述切换单元包括:
读取模块,设置为在API服务器确认起库信息和同步信息后,ETL任务运行时所在的服务器读取数据源配置表中的连接数据;
修改模块,设置为所述ETL任务运行时所在的服务器通过PYTHON程序中的Oracle包连接服务器配置库,执行UPDATE语句,修改数据源配置表中的连接字符串,改变ETL任务运行时所连接的数据库,自动切换数据源。
在一个实施例中,ETL任务数据源切换系统还包括:监控单元,设置为所述ETL任务运行时所在的服务器自动切换到需要操作的数据源之后,在API服务器的数据库中设置工作日志,所述工作日志设置为监控记录数据源是否切换成功,若未成功切换则发出警报通知用户。
在一个实施例中,所述警报包括电话告警和电子邮件通知。
在一个实施例中,提出了一种计算机设备,所述计算机设备包括存储器和处理器,存储器中存储有计算机可读指令,计算机可读指令被处理器执行时,使得处理器执行所述计算机程序时实现上述各实施例里ETL任务数据源切换方法中的步骤。
在一个实施例中,提出了一种存储有计算机可读指令的存储介质,该计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行上述各实施例里ETL任务数据源切换方法中的步骤。其中,存储介质可以为非易失性存储介质。
本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序可以存储于一计算机可读存储介质中,存储介质可以包括:只读存储器(ROM,Read Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁盘或光盘等。
以上所述实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。
以上所述实施例仅表达了本申请一些示例性实施例,其描述较为具体和详 细,但并不能因此而理解为对本申请专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。

Claims (20)

  1. 一种ETL任务数据源切换方法,包括:
    在ETL任务运行时所在的服务器配置库中预置映射表和数据源配置表,所述映射表包括生产库和COW库,将所述映射表中的生产库连接字符串和COW库连接字符串一一对应,所述数据源配置表中的连接数据包括连接字符串;
    调用SHELL脚本,所述SHELL脚本封装有调用API服务器的CURL命令,利用CURL命名调用API服务器,通过API服务器检测和修改配置库中的连接字符串;
    在API服务器的数据库中设置数据库表,所述数据库表包含COW库的起库信息和同步数据信息,根据所述数据库表中记录的数据检测数据库是否起库,以及是否将数据同步到凌晨时间0点,所述起库是数据库启动实例;
    在API服务器确认起库信息和同步信息后,ETL任务运行时所在的服务器读取数据源配置表中的连接数据,修改数据源配置表中的连接字符串,自动切换到需要操作的数据源。
  2. 根据权利要求1所述的ETL任务数据源切换方法,其中,所述数据源配置表中的连接数据还包括数据源名称、安全标识符、数据库用户名及密码。
  3. 根据权利要求1所述的ETL任务数据源切换方法,其中,所述调用SHELL脚本,所述SHELL脚本封装有调用API服务器的CURL命令,利用CURL命名调用API服务器,通过API服务器检测和修改配置库中的连接字符串,包括:
    通过程序在服务器上设置CRONTAB表达式,所述表达式包括时间点和所述时间点需要执行的脚本名称,通过设置CRONTAB表达式的脚本名称来调用需要定时执行的SHELL脚本;
    所述SHELL脚本封装有调用API服务器的CURL命令,所述CURL命令通过命令行方式发起HTTP请求,进而调用API服务器;
    通过API服务器检测和修改配置库中的连接字符串。
  4. 根据权利要求1所述的ETL任务数据源切换方法,其中,所述在API服务器确认起库信息和同步信息后,ETL任务运行时所在的服务器读取数据源配置表中的连接数据,修改数据源配置表中的连接字符串,自动切换到需要操作的数据源,包括:
    在API服务器确认起库信息和同步信息后,ETL任务运行时所在的服务器读取数据源配置表中的连接数据,ETL任务运行时所在的服务器读取数据源配置表中的连接数据,通过PYTHON程序中的Oracle包连接服务器配置库,执行UPDATE语句,修改数据源配置表中的连接字符串,改变ETL任务运行时所连接的数据库,自动切换数据源。
  5. 根据权利要求1所述的ETL任务数据源切换方法,其中,所述自动切换到需要操作的数据源之后还包括:
    在API服务器的数据库中设置工作日志,所述工作日志设置为监控记录数据源是否切换成功,若未成功切换则发出警报通知用户。
  6. 根据权利要求5所述的ETL任务数据源切换方法,其中,所述警报包括电话告警和电子邮件通知。
  7. 一种ETL任务数据源切换系统,包括:
    对应单元,设置为在ETL任务运行时所在的服务器配置库中预置映射表和数据源配置表,所述映射表包括生产库和COW库,将所述映射表中的生产库连接字符串和COW库连接字符串一一对应,所述数据源配置表中的连接数据包括连接字符串;
    调用单元,设置为调用SHELL脚本,所述SHELL脚本封装有调用API服务器的CURL命令,利用CURL命名调用API服务器,通过API服务器检测和修改配置库中的连接字符串;
    起库同步单元,设置为在API服务器的数据库中设置数据库表,所述数据库表包含COW库的起库信息和同步数据信息,根据所述数据库表中记录的数据检测数据库是否起库,以及是否将数据同步到凌晨时间0点,所述起库是数据库启动实例;
    切换单元,设置为在API服务器确认起库信息和同步信息后,ETL任务运行时所在的服务器读取数据源配置表中的连接数据,修改数据源配置表中的连接字符串,自动切换到需要操作的数据源。
  8. 根据权利要求7所述的ETL任务数据源切换系统,其中,所述数据源配置表中的连接数据还包括数据源名称、安全标识符、数据库用户名及密码。
  9. 根据权利要求7所述的ETL任务数据源切换系统,其中,所述调用单元包括:
    设置模块,设置为通过程序在服务器上设置CRONTAB表达式,所述表达式包括时间点和所述时间点需要执行的脚本名称,通过设置CRONTAB表达式的脚本名称来调用需要定时执行的SHELL脚本;
    调用模块,设置为所述SHELL脚本封装有调用API服务器的CURL命令,所述CURL命令通过命令行方式发起HTTP请求,进而调用API服务器;
    检测模块,设置为通过API服务器检测和修改配置库中的连接字符串。
  10. 根据权利要求7所述的ETL任务数据源切换系统,其中,所述切换单元包括:
    读取模块,设置为在API服务器确认起库信息和同步信息后,ETL任务运行时所在的服务器读取数据源配置表中的连接数据;
    修改模块,设置为所述ETL任务运行时所在的服务器通过PYTHON程序中的Oracle包连接服务器配置库,执行UPDATE语句,修改数据源配置表中的连接字符串,改变ETL任务运行时所连接的数据库,自动切换数据源。
  11. 根据权利要求7所述的ETL任务数据源切换系统,其中,还包括:
    监控单元,设置为所述ETL任务运行时所在的服务器自动切换到需要操作的数据源之后,在API服务器的数据库中设置工作日志,所述工作日志设置为监控记录数据源是否切换成功,若未成功切换则发出警报通知用户。
  12. 根据权利要求11所述的ETL任务数据源切换系统,其中,所述警报包括电话告警和电子邮件通知。
  13. 一种计算机设备,包括存储器和处理器,所述存储器中存储有计算机可读指令,所述计算机可读指令被所述处理器执行时,使得所述处理器执行以下步骤:
    在ETL任务运行时所在的服务器配置库中预置映射表和数据源配置表,所述映射表包括生产库和COW库,将所述映射表中的生产库连接字符串和COW库连接字符串一一对应,所述数据源配置表中的连接数据包括连接字符串;
    调用SHELL脚本,所述SHELL脚本封装有调用API服务器的CURL命令,利 用CURL命名调用API服务器,通过API服务器检测和修改配置库中的连接字符串;
    在API服务器的数据库中设置数据库表,所述数据库表包含COW库的起库信息和同步数据信息,根据所述数据库表中记录的数据检测数据库是否起库,以及是否将数据同步到凌晨时间0点,所述起库是数据库启动实例;
    在API服务器确认起库信息和同步信息后,ETL任务运行时所在的服务器读取数据源配置表中的连接数据,修改数据源配置表中的连接字符串,自动切换到需要操作的数据源。
  14. 根据权利要求13所述的计算机设备,其中,所述调用SHELL脚本,所述SHELL脚本封装有调用API服务器的CURL命令,利用CURL命名调用API服务器,通过API服务器检测和修改配置库中的连接字符串,使得所述处理器执行以下步骤:
    通过程序在服务器上设置CRONTAB表达式,所述表达式包括时间点和所述时间点需要执行的脚本名称,通过设置CRONTAB表达式的脚本名称来调用需要定时执行的SHELL脚本;
    所述SHELL脚本封装有调用API服务器的CURL命令,所述CURL命令通过命令行方式发起HTTP请求,进而调用API服务器;
    通过API服务器检测和修改配置库中的连接字符串。
  15. 根据权利要求13所述的计算机设备,其中,所述在API服务器确认起库信息和同步信息后,ETL任务运行时所在的服务器读取数据源配置表中的连接数据,修改数据源配置表中的连接字符串,自动切换到需要操作的数据源,使得所述处理器执行以下步骤:
    在API服务器确认起库信息和同步信息后,ETL任务运行时所在的服务器读取数据源配置表中的连接数据,通过PYTHON程序中的Oracle包连接服务器配置库,执行UPDATE语句,修改数据源配置表中的连接字符串,改变ETL任务运行时所连接的数据库,自动切换数据源。
  16. 根据权利要求13所述的计算机设备,其中,所述自动切换到需要操作的数据源之后,还使得所述处理器执行以下步骤:
    在API服务器的数据库中设置工作日志,所述工作日志设置为监控记录数据源是否切换成功,若未成功切换则发出警报通知用户。
  17. 一种存储有计算机可读指令的存储介质,所述计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行以下步骤:
  18. 根据权利要求17所述的存储介质,其中,所述调用SHELL脚本,所述SHELL脚本封装有调用API服务器的CURL命令,利用CURL命名调用API服务器,通过API服务器检测和修改配置库中的连接字符串,使得一个或多个处理器执行以下步骤:
    通过程序在服务器上设置CRONTAB表达式,所述表达式包括时间点和所述时间点需要执行的脚本名称,通过设置CRONTAB表达式的脚本名称来调用需要定时执行的SHELL脚本;
    所述SHELL脚本封装有调用API服务器的CURL命令,所述CURL命令通过命令行方式发起HTTP请求,进而调用API服务器;
    通过API服务器检测和修改配置库中的连接字符串。
  19. 根据权利要求17所述的存储介质,其中,所述在API服务器确认起库信息和同步信息后,ETL任务运行时所在的服务器读取数据源配置表中的连接数据,修改数据源配置表中的连接字符串,自动切换到需要操作的数据源,使得一个或多个处理器执行以下步骤:
    在API服务器确认起库信息和同步信息后,ETL任务运行时所在的服务器读取数据源配置表中的连接数据,通过PYTHON程序中的Oracle包连接服务器配置库,执行UPDATE语句,修改数据源配置表中的连接字符串,改变ETL任务运行时所连接的数据库,自动切换数据源。
  20. 根据权利要求17所述的存储介质,其中,所述自动切换到需要操作的数据源之后,还使得一个或多个处理器执行以下步骤:
    在API服务器的数据库中设置工作日志,所述工作日志设置为监控记录数据源是否切换成功,若未成功切换则发出警报通知用户。
PCT/CN2018/104707 2018-05-21 2018-09-08 Etl任务数据源切换方法、系统、计算机设备和存储介质 WO2019223181A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810486101.2A CN108710684B (zh) 2018-05-21 2018-05-21 Etl任务数据源切换方法、系统、计算机设备和存储介质
CN201810486101.2 2018-05-21

Publications (1)

Publication Number Publication Date
WO2019223181A1 true WO2019223181A1 (zh) 2019-11-28

Family

ID=63869298

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/104707 WO2019223181A1 (zh) 2018-05-21 2018-09-08 Etl任务数据源切换方法、系统、计算机设备和存储介质

Country Status (2)

Country Link
CN (1) CN108710684B (zh)
WO (1) WO2019223181A1 (zh)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112732828A (zh) * 2020-12-22 2021-04-30 航天信息股份有限公司 基于数据仓库工具的跨平台数据共享方法
CN113836214A (zh) * 2021-09-30 2021-12-24 杭州数梦工场科技有限公司 应用于etl的数据加载、读取方法和装置及电子设备
CN113923256A (zh) * 2020-06-22 2022-01-11 北京金山云网络技术有限公司 一种数据源管理方法、装置、服务器及系统
CN116860227A (zh) * 2023-07-12 2023-10-10 北京东方金信科技股份有限公司 一种基于大数据etl脚本编排的数据开发系统及方法

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114650283A (zh) * 2020-12-21 2022-06-21 京东科技控股股份有限公司 动态切换云存储服务的方法、装置、电子设备及存储介质
CN114973483A (zh) * 2021-02-25 2022-08-30 星络社区云物联科技有限公司 门禁密码校验方法、门禁设备及计算机可读存储介质
CN116775737B (zh) * 2023-06-21 2024-04-30 上海腾道信息技术有限公司 一种自动生成etl配置的方法以及系统

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060250248A1 (en) * 2005-05-05 2006-11-09 Mengru Tu System and a method, including software and hardware, for providing real-time and synchronization views of supply chain information
CN104298773A (zh) * 2014-10-30 2015-01-21 北京思特奇信息技术股份有限公司 一种etl作业自动切库系统及方法
US20170032458A1 (en) * 2015-07-29 2017-02-02 Stressco Inc. Systems, methods and devices for extraction, aggregation, analysis and reporting of financial data
CN107463709A (zh) * 2017-08-21 2017-12-12 北京奇艺世纪科技有限公司 一种基于多数据源的etl处理方法及装置
CN107992552A (zh) * 2017-11-28 2018-05-04 南京莱斯信息技术股份有限公司 一种数据交换平台及数据交换方法

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060250248A1 (en) * 2005-05-05 2006-11-09 Mengru Tu System and a method, including software and hardware, for providing real-time and synchronization views of supply chain information
CN104298773A (zh) * 2014-10-30 2015-01-21 北京思特奇信息技术股份有限公司 一种etl作业自动切库系统及方法
US20170032458A1 (en) * 2015-07-29 2017-02-02 Stressco Inc. Systems, methods and devices for extraction, aggregation, analysis and reporting of financial data
CN107463709A (zh) * 2017-08-21 2017-12-12 北京奇艺世纪科技有限公司 一种基于多数据源的etl处理方法及装置
CN107992552A (zh) * 2017-11-28 2018-05-04 南京莱斯信息技术股份有限公司 一种数据交换平台及数据交换方法

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113923256A (zh) * 2020-06-22 2022-01-11 北京金山云网络技术有限公司 一种数据源管理方法、装置、服务器及系统
CN113923256B (zh) * 2020-06-22 2024-05-03 北京金山云网络技术有限公司 一种数据源管理方法、装置、服务器及系统
CN112732828A (zh) * 2020-12-22 2021-04-30 航天信息股份有限公司 基于数据仓库工具的跨平台数据共享方法
CN113836214A (zh) * 2021-09-30 2021-12-24 杭州数梦工场科技有限公司 应用于etl的数据加载、读取方法和装置及电子设备
CN116860227A (zh) * 2023-07-12 2023-10-10 北京东方金信科技股份有限公司 一种基于大数据etl脚本编排的数据开发系统及方法
CN116860227B (zh) * 2023-07-12 2024-02-09 北京东方金信科技股份有限公司 一种基于大数据etl脚本编排的数据开发系统及方法

Also Published As

Publication number Publication date
CN108710684A (zh) 2018-10-26
CN108710684B (zh) 2023-05-30

Similar Documents

Publication Publication Date Title
WO2019223181A1 (zh) Etl任务数据源切换方法、系统、计算机设备和存储介质
US11914486B2 (en) Cloning and recovery of data volumes
US10762075B2 (en) Database interface agent for a tenant-based upgrade system
US10067952B2 (en) Retrieving point-in-time copies of a source database for creating virtual databases
CA2778110C (en) Provisioning and managing replicated data instances
US8117492B1 (en) Techniques for backup error management
US9141680B2 (en) Data consistency and rollback for cloud analytics
US11748214B2 (en) Remote snappable linking
WO2020029376A1 (zh) 日志采集方法、系统、计算机设备和存储介质
US9892001B2 (en) Customizing backup and restore of databases
US11294866B2 (en) Lazy optimistic concurrency control
CN111324617A (zh) 一种数据库在线热备份的方法和设备
US9535806B1 (en) User-defined storage system failure detection and failover management
US20210216568A1 (en) Efficient configuration replication using a configuration change log
US20240069779A1 (en) Object storage based asynchronous mailbox, eventual consistency for cross-region communication
US11520752B2 (en) Remote control of a change data capture system
US20210248108A1 (en) Asynchronous data synchronization and reconciliation
US20230306129A1 (en) Sensitive data discovery for databases
CN114385592A (zh) 故障转移方法、装置、设备及存储介质
CN115292097A (zh) 数据库实例创建方法、装置、设备、存储介质和程序产品

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: 18920050

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: 18920050

Country of ref document: EP

Kind code of ref document: A1