CN111176718A - Script online method and device, storage medium and electronic equipment - Google Patents

Script online method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN111176718A
CN111176718A CN201911348741.8A CN201911348741A CN111176718A CN 111176718 A CN111176718 A CN 111176718A CN 201911348741 A CN201911348741 A CN 201911348741A CN 111176718 A CN111176718 A CN 111176718A
Authority
CN
China
Prior art keywords
script
statement
online
identifier
source
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.)
Pending
Application number
CN201911348741.8A
Other languages
Chinese (zh)
Inventor
喻芳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Property and Casualty Insurance Company of China Ltd
Original Assignee
Ping An Property and Casualty Insurance Company of China Ltd
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 Ping An Property and Casualty Insurance Company of China Ltd filed Critical Ping An Property and Casualty Insurance Company of China Ltd
Priority to CN201911348741.8A priority Critical patent/CN111176718A/en
Publication of CN111176718A publication Critical patent/CN111176718A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The application relates to a script online method, a script online device, a storage medium and electronic equipment, belonging to the technical field of computers, wherein the method comprises the following steps: scanning the table name after the target table related statement in the script to be on-line to obtain a target table set; scanning the table name of the source table related statement in the script to be online to obtain a source table set; acquiring a first identifier of a target table related statement associated with each target table in the target table set, and acquiring a second identifier of a source table related statement associated with each source table in the source table set; acquiring an incidence relation between the first identifier and the second identifier; and creating a task dependency relationship of the script to be online based on the association relationship, the target table set and the source table set, so as to perform online of the script based on the task dependency relationship. The method effectively improves the stability of the script online.

Description

Script online method and device, storage medium and electronic equipment
Technical Field
The application relates to the technical field of computers, in particular to a script online method, a script online device, a script online storage medium and electronic equipment.
Background
The script is online, namely after a script developer develops a script to be online, the script is online to a predetermined system by adding a task name of the script to be online and configuring a dependency relationship between other script scheduling tasks.
At present, when a script is on line, in order to ensure that the script to be on line is on line, tasks can be completed according to expected frequency, rules and sequence. And a task dependency relationship needs to be configured on line, and if the task dependency relationship is wrong, a target task cannot be completed smoothly, so that great cost needs to be consumed for remediation. At present, the problem that the online success rate of the script is difficult to guarantee due to unstable task dependency configuration exists.
It is to be noted that the information disclosed in the above background section is only for enhancement of understanding of the background of the present application and therefore may include information that does not constitute prior art known to a person of ordinary skill in the art.
Disclosure of Invention
An object of the present application is to provide a script online scheme, and further at least to some extent according to an aspect of the present application, a script online method is provided, including:
scanning the table name after the target table related statement in the script to be on-line to obtain a target table set;
scanning the table name of the source table related statement in the script to be online to obtain a source table set;
acquiring a first identifier of a target table related statement associated with each target table in the target table set, and acquiring a second identifier of a source table related statement associated with each source table in the source table set;
acquiring an incidence relation between the first identifier and the second identifier;
and creating a task dependency relationship of the script to be online based on the association relationship, the target table set and the source table set, so as to perform online of the script based on the task dependency relationship.
In an exemplary embodiment of the present application, the obtaining a first identifier of a target table related statement associated with each target table in the target table set includes:
scanning all target table related statements of the script to be on-line;
determining the table name after the target table related statement;
and adding a first identifier for the target table related statement according to the target table related statement and the table name after the target table related statement.
In an exemplary embodiment of the application, the obtaining a second identifier of a source table related statement associated with each source table in the source table set includes:
scanning all source table related statements of the script to be on-line;
determining the table name after the source table related statement;
and adding a second identifier for the source table related statement according to the source table related statement and the table name after the source table related statement.
In an exemplary embodiment of the present application, after obtaining the first identifier of the target table related statement associated with each target table in the target table set and obtaining the second identifier of the source table related statement associated with each source table in the source table set, the method further includes:
acquiring a first script statement from which a target table related statement corresponding to the first identifier originates and a second script statement from which a source table related statement corresponding to the second identifier originates;
and constructing a related statement association relation table of the first identification, the second identification, the first script statement and the second script statement.
In an exemplary embodiment of the present application, the obtaining an association relationship between the first identifier and the second identifier includes:
acquiring a preset task table of the script to be on-line, wherein the task association relation of each task and a script statement corresponding to each task are stored in the preset task table;
and acquiring the association relation between the first identifier and the second identifier based on the preset task table and the statement association relation table.
In an exemplary embodiment of the present application, the performing script online based on the task dependency relationship includes:
retrieving all tasks of the script file based on the task dependency relationship;
and acquiring the table name of the from statement and the join statement in each task, generating a document required by script online, and performing online of the script to be online.
In an exemplary embodiment of the present application, the method further comprises:
scanning the script to be online according to a preset scanning algorithm, and determining whether the script to be online has script errors;
and when the script to be online has a script error, outputting the task name of the script error source and the error reason.
According to an aspect of the present application, there is provided a script online device, including:
the first scanning module is used for scanning the table name after the target table related statement in the script to be online to obtain a target table set;
the second scanning module is used for scanning the table name after the source table related statement in the script to be online to obtain a source table set;
an identifier obtaining module, configured to obtain a first identifier of a target table related statement associated with each target table in the target table set, and obtain a second identifier of a source table related statement associated with each source table in the source table set;
the association relation acquisition module is used for acquiring the association relation between the first identifier and the second identifier;
and the online module is used for creating a task dependency relationship of the script to be online based on the association relationship, the target table set and the source table set so as to perform online of the script based on the task dependency relationship.
According to an aspect of the application, there is provided a computer readable storage medium having stored thereon a program of instructions which, when executed by a processor, implement the method of any of the above.
According to an aspect of the present application, there is provided an electronic device including:
a processor; and a memory for storing a program of instructions for the processor; wherein the processor is configured to perform any of the methods described above via execution of the program of instructions.
The script online method and device scan a table name after a target table related statement in a script to be online to obtain a target table set; scanning the table name of the source table related statement in the script to be online to obtain a source table set; acquiring a first identifier of a target table related statement associated with each target table in a target table set, and acquiring a second identifier of a source table related statement associated with each source table in a source table set; acquiring an incidence relation between a first identifier and a second identifier; and establishing a task dependency relationship of the script to be online based on the association relationship, the target table set and the source table set, and further performing online of the script based on the task dependency relationship. Therefore, based on the incidence relation between each source table and the relevant sentences of the source table and the incidence relation between each target table and the relevant sentences of the target table, the task dependency relations between all the target tables and the source table can be accurately determined, the task dependency relations of the scripts to be on-line can be accurately and stably established, and the success rate and the stability of the scripts to be on-line can be ensured.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application. It is obvious that the drawings in the following description are only some embodiments of the application, and that for a person skilled in the art, other drawings can be derived from them without inventive effort.
FIG. 1 schematically illustrates a flow chart of a script online method.
FIG. 2 schematically illustrates an example application scenario of a script online method.
Fig. 3 schematically shows a flow chart of a method of obtaining an association relationship.
FIG. 4 schematically shows a block diagram of a script threading device.
FIG. 5 schematically illustrates an example block diagram of an electronic device for implementing the script bringing on line method described above.
Fig. 6 schematically illustrates a computer-readable storage medium for implementing the above-described script online method.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the application. One skilled in the relevant art will recognize, however, that the subject matter of the present application can be practiced without one or more of the specific details, or with other methods, components, devices, steps, and so forth. In other instances, well-known technical solutions have not been shown or described in detail to avoid obscuring aspects of the present application.
Furthermore, the drawings are merely schematic illustrations of the present application and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus their repetitive description will be omitted. Some of the block diagrams shown in the figures are functional entities and do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor devices and/or microcontroller devices.
In the present exemplary embodiment, a script online method is first provided, and the script online method may be executed on a server, or may also be executed on a server cluster or a cloud server, and the like. Referring to fig. 1, the script online method may include the following steps:
step S110, scanning the table name after the target table related statement in the script to be online to obtain a target table set;
step S120, scanning the table name of the source table related statement in the script to be online to obtain a source table set;
step S130, acquiring a first identifier of a target table related statement associated with each target table in the target table set, and acquiring a second identifier of a source table related statement associated with each source table in the source table set;
step S140, acquiring an association relation between the first identifier and the second identifier;
and S150, establishing a task dependency relationship of the script to be online based on the association relationship, the target table set and the source table set, and performing online of the script based on the task dependency relationship.
In the script online method, firstly, a table name after a target table related statement in a script to be online is scanned to obtain a target table set; a collection of task tables for a scripting language to accomplish a desired task may be obtained. Then, scanning the table name after the source table related statement in the script to be online to obtain a source table set; a set of all source tables needed by the task in the script to be brought online can be obtained. Further, a first identifier of a target table related statement associated with each target table in the target table set is obtained, and a second identifier of a source table related statement associated with each source table in the source table set is obtained; the corresponding mark added by the task completed by the script statement can be obtained, and the task association relation between each statement and the statements can be quickly determined. Then, acquiring an incidence relation between the first identifier and the second identifier; the association relationship between each target table and the source table in the script to be online can be determined. And finally, creating a task dependency relationship of the script to be online based on the association relationship, the target table set and the source table set, and performing online of the script based on the task dependency relationship. Therefore, based on the incidence relation between each source table and the relevant sentences of the source table and the incidence relation between each target table and the relevant sentences of the target table, the task dependency relations between all the target tables and the source table can be accurately determined, the task dependency relations of the scripts to be on-line can be accurately and stably established, and the success rate and the stability of the scripts to be on-line can be ensured.
Hereinafter, each step in the above-described script online method in the present exemplary embodiment will be explained and explained in detail with reference to the drawings.
In step S110, the table name after the target table related statement in the script to be online is scanned to obtain a target table set.
In the embodiment of the present example, referring to fig. 2, the server 201 scans the table name of the target table related statement in the to-be-uploaded script to be online, which is prepared on the server 202 in advance, to obtain the target table set. This allows task dependency creation of the script to be brought online in subsequent steps by the server 201. It can be understood that, according to the requirement, the server 202 may also directly scan the table name after the target table related statement in the script to be online to obtain the target table set. The server 201 and the server 202 may be any devices with processing capability, such as a computer, a microprocessor, etc., and are not limited herein.
The script to be online is a script to be prepared to be online to a predetermined system, and may include a script language such as SQL statements. And finishing the task table of the expected task by a target table in the script to be on-line, namely the script language. The target table related statement, such as insert over write statement, calls the statement of the data of other source tables, and the statement firstly removes the data of the target table and then inserts new data. By scanning the related statements of the target table in the script to be on-line, the table names, namely the target table, can be scanned at the same time to obtain the set of all the target tables in the script to be on-line, and then all the target tables completing the expected tasks based on the script to be on-line can completely determine all the task association relations in the subsequent steps.
In step S120, the table name after the source table related statement in the to-be-online script is scanned to obtain a source table set.
In the embodiment of the present example, the source table related statements, such as the from statement and the join statement, are tables from which the data that the target table must depend to complete the expected task is sourced, and are usually called through the source table related statements. The source table is a table of sources of call data needed by the target table to complete the intended task. By scanning the table names after the source table related statements in the script to be on-line, the set of all source tables required by the tasks in the script to be on-line can be obtained, and the complete task association relationship can be determined in the subsequent steps.
In step S130, a first identifier of a target table related statement associated with each target table in the target table set is obtained, and a second identifier of a source table related statement associated with each source table in the source table set is obtained.
In the embodiment of the present example, the target table related statement and the source table related statement cooperate with each other to complete all tasks of the to-be-on-line script, and different statements are used to complete different tasks. Meanwhile, the relation between the target table related statement and the source table related statement has the relations of circular calling, direct calling and the like. Therefore, when the script to be on-line is created, the rule can be set in advance according to the script statement label, and the corresponding identifier can be added according to the task completed by the script statement, so that the method can be used for quickly determining the task association relationship between each statement and the statements.
In an implementation manner of this example, obtaining the first identifier of the target table related statement associated with each target table in the target table set includes:
scanning all target table related statements of the script to be on-line;
determining the table name after the target table related statement;
and adding a first identifier for the target table related statement according to the target table related statement and the table name after the target table related statement.
For example, if the table name after the target table related statement is a, a first identifier a-m may be added to the target table related statement according to the target table related statement and the table name after the target table related statement, where m is a sequence number of an order scanned by the target table related statement, and the like. The same label can be added to the related statement of the target table corresponding to the same table name, so that the accuracy of determining the task dependency relationship in the subsequent step is ensured.
In an implementation manner of this example, the obtaining of the second identifier of the source table related statement associated with each source table in the source table set includes:
scanning all source table related statements of the script to be on-line;
determining the table name after the source table related statement;
and adding a second identifier for the source table related statement according to the source table related statement and the table name after the source table related statement.
For example, if the table name after the source table related statement is B, a second identifier B-n may be added to the source table related statement according to the source table related statement and the table name after the source table related statement, where n is a sequence number of an order scanned by the source table related statement, and the like. The same label can be added to the source table related statements corresponding to the same table name, and the accuracy of determining the task dependency relationship in the subsequent steps is guaranteed.
In an implementation manner of this example, after obtaining the first preset identifier of the target table related statement associated with each target table in the target table set and obtaining the second preset identifier of the source table related statement associated with each source table in the source table set, the method further includes:
acquiring the first preset identification and the second preset identification;
acquiring a first script statement from which a target table related statement corresponding to the first preset identifier comes and a second script statement from which a source table related statement corresponding to the second preset identifier comes;
and constructing a related statement association relation table of the first preset identification, the second preset identification, the first script statement and the second script statement.
The target table related statement and the source table related statement are clauses in the complete script statement for completing the predetermined task. By obtaining the first script statement from which the target table related statement originates and the second script statement from which the source table related statement originates, it can be determined whether the association relationship between each target related statement and each source table related statement, for example, whether the association relationship is from the same script statement or from a script statement having a call relationship. The first script statement and the second script statement are complete statements which can complete a sub-expected task in the script to be on-line. Through the first preset identification, the second preset identification, the first script statement and the related statement incidence relation table of the second script statement of the component, the incidence relation of each statement can be quickly determined.
In step S140, an association relationship between the first identifier and the second identifier is obtained.
In this example, the first preset identifier corresponds to a target table related statement, the second preset identifier corresponds to a source table related statement, and the association relationship between the two may include whether the two correspond to the same script statement, a logical relationship between the two when the target task is completed, and the like. The incidence relation between each target table and the source table in the script to be online can be accurately determined by obtaining the incidence relation between the first preset identification and the second preset identification, so that redundant and wrong incidence relations between the target tables and the source tables can not be determined, meanwhile, the dependence relation which does not exist between the target tables and the source tables can be determined in time, and the online stability of the script to be online is ensured.
In an implementation manner of this example, as shown in fig. 3, the obtaining an association relationship between the first identifier and the second identifier includes:
step S310, acquiring a preset task table of the script to be on-line, wherein the task association relation of each task and a script statement corresponding to each task are stored in the preset task table;
step S320, obtaining an association relationship between the first identifier and the second identifier based on the preset task table and the related statement association relationship table.
The relationship between all script statements used for completing the tasks of the script to be on-line can be determined through the task association relationship and the script statement corresponding to each task, such as circular reference, direct calling and the like. The statement incidence relation table stores the incidence relation between the target table relevant statement, the source table relevant statement mark and the script statement of the source table relevant statement source; then, based on the target table related statement, the source table related statement mark and the target table related statement and the source table related statement source script statement correlation in the correlation table, the correlation of each target table related statement and source table related statement can be obtained; and finally, determining the task association relationship of the target table related statement and the source table related statement and the requirement calling relationship between the target table related statement and the source table related statement. And then the accurate dependency relationship between the target table and the source table can be accurately determined, useless dependency relationship is eliminated, and the scheduling reasonability of online of the script is ensured.
In step S150, a task dependency of the script to be online is created based on the association relationship, the target table set, and the source table set, so as to perform online of the script based on the task dependency.
In an embodiment of this example, the association relationship is an association relationship between all target table related statements and all source table related statements, and each target table related statement and each source table related statement corresponds to one target table or one source table. And simultaneously, the target table set and the source table set comprise all the source tables and the target tables in the script to be online. Therefore, based on the incidence relation between each source table and the relevant sentences of the source table and the incidence relation between each target table and the relevant sentences of the target table, the task dependency relations between all the target tables and the source table can be accurately determined, the task dependency relations of the scripts to be online can be accurately established, and the success rate of online of the scripts to be online is ensured.
In an embodiment of this example, performing script online based on the task dependency relationship includes:
retrieving all tasks of the script file based on the task dependency relationship;
and acquiring the table name of the from statement and the join statement in each task, generating a document required by script online, and performing online of the script to be online.
In an implementation manner of this example, the method further includes:
scanning the script to be online according to a preset scanning algorithm, and determining whether the script to be online has script errors;
and when the script to be online has a script error, outputting the task name of the script error source and the error reason.
And searching a low-level error script in the script, if the association condition has a field which is associated with the same table field, and if the association condition has the field which is associated with the table field, the script runs at a very slow speed due to A.POLICY _ NO, the resource is occupied, and a task name with a low-level error and an error reason are output.
The application also provides a script threading device. Referring to fig. 4, the script online device may include a first obtaining module 410, a second scanning module 420, an identifier obtaining module 430, an association obtaining module 440, and an online module 450. Wherein:
the first scanning module 410 is configured to scan a table name of a target table after a target table related statement in the script to be online to obtain a target table set;
the second scanning module 420 is configured to scan the table name of the source table related statement in the script to be online to obtain a source table set;
the identifier obtaining module 430 is configured to obtain a first identifier of a target table related statement associated with each target table in the target table set, and obtain a second identifier of a source table related statement associated with each source table in the source table set;
the association relation obtaining module 440 is configured to obtain an association relation between the first identifier and the second identifier;
the online module 450 is configured to create a task dependency relationship of the script to be online based on the association relationship, the target table set, and the source table set, so as to perform online of the script based on the task dependency relationship.
The specific details of each module in the script online device have been described in detail in the corresponding script online method, and therefore are not described herein again.
It should be noted that although in the above detailed description several modules or units of the device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit, according to embodiments of the application. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units.
Moreover, although the steps of the methods herein are depicted in the drawings in a particular order, this does not require or imply that the steps must be performed in this particular order, or that all of the depicted steps must be performed, to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step execution, and/or one step broken down into multiple step executions, etc.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the embodiments of the present application.
In an exemplary embodiment of the present application, there is also provided an electronic device capable of implementing the above method.
As will be appreciated by one skilled in the art, aspects of the present invention may be embodied as a system, method or program product. Thus, various aspects of the invention may be embodied in the form of: an entirely hardware embodiment, an entirely software embodiment (including firmware, microcode, etc.) or an embodiment combining hardware and software aspects that may all generally be referred to herein as a "circuit," module "or" system.
An electronic device 500 according to this embodiment of the invention is described below with reference to fig. 5. The electronic device 500 shown in fig. 5 is only an example and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 5, the electronic device 500 is embodied in the form of a general purpose computing device. The components of the electronic device 500 may include, but are not limited to: the at least one processing unit 510, the at least one memory unit 520, and a bus 530 that couples various system components including the memory unit 520 and the processing unit 510.
Wherein the storage unit stores program code that is executable by the processing unit 510 to cause the processing unit 510 to perform steps according to various exemplary embodiments of the present invention as described in the above section "exemplary methods" of the present specification. For example, the processing unit 510 may perform the steps as shown in fig. 1.
The memory unit 520 may include a readable medium in the form of a volatile memory unit, such as a random access memory unit (RAM)5201 and/or a cache memory unit 5202, and may further include a read only memory unit (ROM) 5203.
Storage unit 520 may also include a program/utility 5204 having a set (at least one) of program modules 5205, such program modules 5205 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
Bus 530 may be one or more of any of several types of bus structures including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
The electronic device 500 may also communicate with one or more external devices 700 (e.g., keyboard, pointing device, bluetooth device, etc.), with one or more devices that enable a client to interact with the electronic device 500, and/or with any devices (e.g., router, modem, etc.) that enable the electronic device 500 to communicate with one or more other computing devices. Such communication may occur via input/output (I/O) interface 550, which may include display unit 540 coupled to input/output (I/O) interface 550. Also, the electronic device 500 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the internet) via the network adapter 560. As shown, the network adapter 560 communicates with the other modules of the electronic device 500 over the bus 530. It should be appreciated that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the electronic device 500, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to make a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) execute the method according to the embodiments of the present application.
In an exemplary embodiment of the present application, there is also provided a computer-readable storage medium having stored thereon a program product capable of implementing the above-described method of the present specification. In some possible embodiments, aspects of the invention may also be implemented in the form of a program product comprising program code means for causing a terminal device to carry out the steps according to various exemplary embodiments of the invention described in the above section "exemplary methods" of the present description, when said program product is run on the terminal device.
Referring to fig. 6, a program product 600 for implementing the above method according to an embodiment of the present invention is described, which may employ a portable compact disc read only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited in this regard and, in the present document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
A computer readable signal medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the client computing device, partly on the client device, as a stand-alone software package, partly on the client computing device and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the client computing device over any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., over the internet using an internet service provider).
Furthermore, the above-described figures are merely schematic illustrations of processes involved in methods according to exemplary embodiments of the invention, and are not intended to be limiting. It will be readily understood that the processes shown in the above figures are not intended to indicate or limit the chronological order of the processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, e.g., in multiple modules.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.

Claims (10)

1. A script online method, comprising:
scanning the table name after the target table related statement in the script to be on-line to obtain a target table set;
scanning the table name of the source table related statement in the script to be online to obtain a source table set;
acquiring a first identifier of a target table related statement associated with each target table in the target table set, and acquiring a second identifier of a source table related statement associated with each source table in the source table set;
acquiring an incidence relation between the first identifier and the second identifier;
and creating a task dependency relationship of the script to be online based on the association relationship, the target table set and the source table set, so as to perform online of the script based on the task dependency relationship.
2. The method of claim 1, wherein obtaining the first identifier of the target table related statement associated with each target table in the set of target tables comprises:
scanning all target table related statements of the script to be on-line;
determining the table name after the target table related statement;
and adding a first identifier for the target table related statement according to the target table related statement and the table name after the target table related statement.
3. The method of claim 1, wherein obtaining the second identifier of the source table related statement associated with each source table in the set of source tables comprises:
scanning all source table related statements of the script to be on-line;
determining the table name after the source table related statement;
and adding a second identifier for the source table related statement according to the source table related statement and the table name after the source table related statement.
4. The method of claim 1, wherein after obtaining the first identification of the target table related statement for each target table association in the set of target tables and obtaining the second identification of the source table related statement for each source table association in the set of source tables, the method further comprises:
acquiring a first script statement from which a target table related statement corresponding to the first identifier originates and a second script statement from which a source table related statement corresponding to the second identifier originates;
and constructing a related statement association relation table of the first identification, the second identification, the first script statement and the second script statement.
5. The method of claim 4, wherein the obtaining the association relationship between the first identifier and the second identifier comprises:
acquiring a preset task table of the script to be on-line, wherein the task association relation of each task and a script statement corresponding to each task are stored in the preset task table;
and acquiring the association relation between the first identifier and the second identifier based on the preset task table and the related statement association relation table.
6. The method of claim 1, wherein the scripting online based on the task dependencies comprises:
retrieving all tasks of the script file based on the task dependency relationship;
and acquiring the table name of the from statement and the join statement in each task, generating a document required by script online, and performing online of the script to be online.
7. The method of claim 1, further comprising:
scanning the script to be online according to a preset scanning algorithm, and determining whether the script to be online has script errors;
and when the script to be online has a script error, outputting the task name of the script error source and the error reason.
8. A script threading device, comprising:
the first scanning module is used for scanning the table name after the target table related statement in the script to be online to obtain a target table set;
the second scanning module is used for scanning the table name after the source table related statement in the script to be online to obtain a source table set;
an identifier obtaining module, configured to obtain a first identifier of a target table related statement associated with each target table in the target table set, and obtain a second identifier of a source table related statement associated with each source table in the source table set;
the association relation acquisition module is used for acquiring the association relation between the first identifier and the second identifier;
and the online module is used for creating a task dependency relationship of the script to be online based on the association relationship, the target table set and the source table set so as to perform online of the script based on the task dependency relationship.
9. A computer readable storage medium having stored thereon a program of instructions, characterized in that the program of instructions, when executed by a processor, implements the method of any of claims 1-7.
10. An electronic device, comprising:
a processor; and
a memory for storing a program of instructions for the processor; wherein the processor is configured to perform the method of any of claims 1-7 via execution of the program of instructions.
CN201911348741.8A 2019-12-24 2019-12-24 Script online method and device, storage medium and electronic equipment Pending CN111176718A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911348741.8A CN111176718A (en) 2019-12-24 2019-12-24 Script online method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911348741.8A CN111176718A (en) 2019-12-24 2019-12-24 Script online method and device, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN111176718A true CN111176718A (en) 2020-05-19

Family

ID=70624285

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911348741.8A Pending CN111176718A (en) 2019-12-24 2019-12-24 Script online method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN111176718A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117608807A (en) * 2023-12-22 2024-02-27 无锡拈花云科技服务有限公司 Automatic creation and dependency automatic construction method, system and medium for data scheduling task

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070234281A1 (en) * 2006-03-28 2007-10-04 Hitachi, Ltd. Apparatus for analyzing task specification
CN102073698A (en) * 2010-12-28 2011-05-25 中国工商银行股份有限公司 Sample data acquisition method and device for enterprise data warehouse system
CN104216888A (en) * 2013-05-30 2014-12-17 中国电信股份有限公司 Data processing task relation setting method and system
CN105589874A (en) * 2014-10-22 2016-05-18 阿里巴巴集团控股有限公司 ETL task dependence relationship detecting method and device and ETL tool
CN110471652A (en) * 2019-08-01 2019-11-19 北京柠檬微趣科技股份有限公司 Task method of combination, composer, equipment and readable storage medium storing program for executing

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070234281A1 (en) * 2006-03-28 2007-10-04 Hitachi, Ltd. Apparatus for analyzing task specification
CN102073698A (en) * 2010-12-28 2011-05-25 中国工商银行股份有限公司 Sample data acquisition method and device for enterprise data warehouse system
CN104216888A (en) * 2013-05-30 2014-12-17 中国电信股份有限公司 Data processing task relation setting method and system
CN105589874A (en) * 2014-10-22 2016-05-18 阿里巴巴集团控股有限公司 ETL task dependence relationship detecting method and device and ETL tool
CN110471652A (en) * 2019-08-01 2019-11-19 北京柠檬微趣科技股份有限公司 Task method of combination, composer, equipment and readable storage medium storing program for executing

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117608807A (en) * 2023-12-22 2024-02-27 无锡拈花云科技服务有限公司 Automatic creation and dependency automatic construction method, system and medium for data scheduling task

Similar Documents

Publication Publication Date Title
CN107506300B (en) User interface testing method, device, server and storage medium
CN109062563B (en) Method and device for generating page
US11074063B2 (en) Automatic upgrade of robotic process automation using a computer
US9535819B2 (en) Identifying the lines of code that caused the error as identified in the stack trace in a source code version that generated the stack trace that does not reside on the user's computing device
US11144437B2 (en) Pre-populating continuous delivery test cases
CN111045653B (en) System generation method and device, computer readable medium and electronic equipment
CN110806958A (en) Monitoring method, monitoring device, storage medium and electronic equipment
US20180275957A1 (en) Assistive technology for code generation using voice and virtual reality
CN110688111A (en) Configuration method, device, server and storage medium of business process
CN111241111B (en) Data query method and device, data comparison method and device, medium and equipment
CN112988578A (en) Automatic testing method and device
CN111176718A (en) Script online method and device, storage medium and electronic equipment
CN107562629B (en) Method and device for testing
CN115454956A (en) Log generation method and device, electronic equipment and storage medium
CN113377648B (en) Software system diagnosis method, device, electronic equipment and computer readable medium
US20190258462A1 (en) Batch script decomposer
CN112395194B (en) Method and device for accessing test platform
CN110806967A (en) Unit testing method and device
CN114741294A (en) Page debugging method, device, equipment and storage medium
CN112988583A (en) Method and device for testing syntax compatibility of database
US11030087B2 (en) Systems and methods for automated invocation of accessibility validations in accessibility scripts
CN110471708B (en) Method and device for acquiring configuration items based on reusable components
CN108170557B (en) Method and apparatus for outputting information
CN113360365A (en) Flow testing method and flow testing system
CN110958243A (en) Network vulnerability submitting method and device, storage medium and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination