CN109542873A - A kind of language based on programming realizes the method and electronic equipment of race historical data again - Google Patents
A kind of language based on programming realizes the method and electronic equipment of race historical data again Download PDFInfo
- Publication number
- CN109542873A CN109542873A CN201811261042.5A CN201811261042A CN109542873A CN 109542873 A CN109542873 A CN 109542873A CN 201811261042 A CN201811261042 A CN 201811261042A CN 109542873 A CN109542873 A CN 109542873A
- Authority
- CN
- China
- Prior art keywords
- language
- time
- programming
- instruction
- historical data
- 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
Links
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The present invention discloses one kind, and language realizes the method and electronic equipment for running historical data again based on programming, wherein method includes: pre-defined destination path, and test file and computer command script document are created in the destination path;The instruction of user's input structure query language in the test file is received, and saves the structured query language of user's input;It receives user to input in the computer command script document for calling the instruction of the programming language of Tool for Data Warehouse, and saves the programming language, the programming language includes that the first execution time and second execute the time;By running the computer command script document, so that the calling Tool for Data Warehouse, which is based on described first, executes time and the second execution time execution structured query language, implementing result is obtained.
Description
Technical field
The present invention relates to programming language fields, more particularly to a kind of language based on programming to realize the method for running historical data again
And electronic equipment.
Background technique
In Hive (Tool for Data Warehouse) off-line calculation scene, it is sometimes necessary to run the partial history number of scheduled date again
According to, wherein historical data refers to source program code, that is, re-executes source program code.
In the prior art, the time parameter that can only first modify source code, is then packaged code, obtains being packaged knot
Fruit, packing of reruning is as a result, run historical data to realize again.Although effectively, this mode is to run institute again to this mode
Some historical datas, undoubtedly in waste system resource and increase the runing time of source program code.
That is, in the prior art, can not directly execute the historical data of specified time.
Therefore, the existing technology needs to be improved and developed.
Summary of the invention
In view of above-mentioned deficiencies of the prior art, it realizes to run again the purpose of the present invention is to provide a kind of language based on programming and go through
The method and electronic equipment of history data, it is intended to solve the prior art and can not directly not execute the historical data of specified time to ask
Topic.
Technical scheme is as follows:
A method of language is realized based on programming runs historical data again comprising:
A, destination path is pre-defined, and creates test file and computer command script document in the destination path;
B, the instruction of user's input structure query language in the test file is received, and saves the knot of user's input
Structure query language;
C, it receives user and inputs the finger for calling the programming language of Tool for Data Warehouse in the computer command script document
It enables, and saves the programming language, the programming language includes that the first execution time and second execute the time;
D, by running the computer command script document, when so that the calling Tool for Data Warehouse being based on the described first execution
Between and second execute the time and execute the structured query language, obtain implementing result.
Preferably, in the step A, the step of pre-defined destination path, is specifically included:
Destination folder is created in a background server in advance, and obtains the destination address of the destination folder, with
And the destination address that will acquire is defined as the destination path.
Preferably, the step B is specifically included:
B1, the instruction that user clicks the test file is received, and shows the content of test file by a display interface;
B2, the instruction for receiving user's input structure query language in the display interface, and save user's input
Structured query language.
Preferably, after the step B2, include: before C
B3, judge whether the test file is SQL format, if so, C is thened follow the steps, if it is not, then receiving user will survey
The suffix name of examination file is revised as the instruction of SQL, and saves modified test file.
Preferably, the computer command script document is shell file.
Preferably, the step D is specifically included:
Judge whether the value of the first execution time and the value that second executes the time are 0, if so, by the command script
Value and second that the time that file internal defines executes the time as described first execute the value of time.
Preferably, the step D further include:
It obtains and executes the historical data between time and the second execution time first, and pass through the structuralized query language
Speech executes the historical data acquired, obtains implementing result.
The present invention also provides a kind of electronic equipment comprising:
Processor is adapted for carrying out each instruction, and
Equipment is stored, is suitable for storing a plurality of instruction, described instruction is suitable for being loaded and being executed by processor:
Pre-defined destination path, and test file and computer command script document are created in the destination path;
The instruction of user's input structure query language in the test file is received, and saves the structure of user's input
Change query language;
It receives user and inputs the instruction for calling the programming language of Tool for Data Warehouse in the computer command script document,
And the programming language is saved, the programming language includes that the first execution time and second execute the time;
By running the computer command script document, so that the calling Tool for Data Warehouse, which is based on described first, executes the time
The time execution structured query language is executed with second, obtains implementing result.
The present invention also provides a kind of computer program products, wherein computer program product is non-volatile including being stored in
Computer program on computer readable storage medium, computer program include program instruction, when program instruction is held by processor
When row, so that the processor is executed the language based on programming and realize the method for running historical data again.
The present invention also provides a kind of non-volatile computer readable storage medium storing program for executing, wherein the non-volatile computer can
It reads storage medium and is stored with computer executable instructions, when which is executed by one or more processors,
One or more of processors may make to execute the language based on programming and realize the method for running historical data again.
The utility model has the advantages that the method provided through the invention, first creation test file and name script file, are then being surveyed
Input structure query language in training this document, and input in computer command script document for calling Tool for Data Warehouse
Programming language, wherein programming language includes that the first execution time and second execute the time, finally by operation command script text
Part, so that the calling Tool for Data Warehouse is based on the first execution time and the second execution time executed the structuring and looks into
Language is ask, implementing result is obtained.It is run the scheduled date (when the first execution time and the second execution again in this way, can be directly realized by
Between between) historical data, also, method provided by the invention has the characteristics that simple, efficient and easy realization.
Detailed description of the invention
Fig. 1 is the flow chart that the method preferred embodiment for running historical data again is realized the present invention is based on programming language.
Fig. 2 is the structural block diagram of electronic equipment preferred embodiment of the present invention.
Specific embodiment
The present invention provides one kind, and language realizes the method and electronic equipment for running historical data again based on programming, to make this hair
Bright purpose, technical solution and effect are clearer, clear, and the present invention is described in more detail below.It should be appreciated that herein
Described specific embodiment is only used to explain the present invention, is not intended to limit the present invention.
Referring to Fig. 1, a kind of language based on programming realizes the method for running historical data again comprising:
S1, pre-defined destination path, and test file and computer command script document are created in the destination path;
S2, the instruction for receiving user's input structure query language in the test file, and save user's input
Structured query language;
S3, reception user input the finger for calling the programming language of Tool for Data Warehouse in the computer command script document
It enables, and saves the programming language, the programming language includes that the first execution time and second execute the time;
S4, pass through the operation computer command script document, executed so that the calling Tool for Data Warehouse is based on described first
Time and second executes the time execution structured query language, obtains implementing result.
The method provided through the invention solves the historical data that can not directly execute specified time in the prior art
Problem.Also, method provided by the invention does not need repeatedly to be packaged source program code, to improve efficiency.It is heavier
It wants, user can through the invention, and Freely input first executes time and the second execution time, to obtain corresponding hold
Therefore row is as a result, improve efficiency.Moreover, it since the present invention does not run all historical datas not instead of again, runs again specified
Therefore the historical data on date greatly reduces the runing time of source code.
In the step S1, the destination path refers to the address information of file, for example, destination path are as follows: C:
Windows addins, for another example destination path are as follows: C: Windows AppCompat.
Test file and computer command script document are created in destination path, refer to destination folder corresponding in destination path
Middle creation test file and computer command script document.
Wherein, test file refers to that entitled " TEST " of this document, suffix are entitled " SQL ";Computer command script document is
Refer to entitled " TEST " of this document, and its suffix is entitled " SH ".When creating test file, test file does not include in any
Hold, that is to say, that it is " sky " file, likewise, computer command script document does not include any yet when creating computer command script document
Content is similarly " sky " file.User can open test file or computer command script document, can Freely input character letter
Breath, wherein character information includes letter, number and additional character.For example, user is after opening test file, the character of input
Information are as follows: ABCD@, user is after opening computer command script document, the character information of input are as follows: 124s!sda.In this way, user
With Freely input character information.
Preferably, in the step S1, the step of pre-defined destination path, is specifically included:
Destination folder is created in a background server in advance, and obtains the destination address of the destination folder, with
And the destination address that will acquire is defined as the destination path.
The background server specifically refers to the cloud device with functions such as storage and processing.It is created in background server
Destination folder is built, then, file destination is obtained and is clipped in the address information of background server, then the address information that will acquire
As destination path.
For example, the entitled A for the destination folder that user creates in background server, and acquire destination folder
The address information of A are as follows: C: Windows addins, then destination path is just are as follows: C: Windows addins;For another example with
The entitled B for the destination folder that family is created in background server, and acquire the address information of file destination B are as follows: C:
Windows AppCompat, then destination path is just are as follows: C: Windows AppCompat.
In the step S2, user input structure query language can lead to directly in test file after the completion of input
Cross the save button of test file offer or by shortcut key storage configuration query language.Wherein, storage configurationization inquires language
The shortcut key of speech is Ctrl+s.
Preferably, the step S2 is specifically included:
S21, the instruction that user clicks the test file is received, and the interior of test file is shown by a display interface
Hold;
S22, the instruction for receiving user's input structure query language in the display interface, and save user's input
Structured query language.
In the step S21, after user opens test file, the content of test file is shown by display interface.When
So, if the test file that user opens is newly-established test file, the content that display interface is shown then is in blank
Hold;If it is the test file after last inputting character information and saved that user, which opens, show that user's last time inputs
Character information.For example, October 19, the character information that user inputs in test file A are as follows: 124s!Sda, and save, that
User then shows 124s in opening test file A on October 20!sda.
In the step S22, after user opens test file, no matter whether there is historical content in test file, use
Per family can in test file input structure query language, then storage configuration query language.
Wherein, structured query language (Structured Query Language), abbreviation SQL are a kind of specific purposes
Programming language, be a kind of data base querying and programming language, for accessing data and querying, updating, and managing pass
It is Database Systems.
Structured query language is advanced deproceduring programming language, and user is allowed to work in high level data structure.
It does not require the specified deposit method to data of user, does not need user yet and understands specific data location mode, so having
The disparate databases system of entirely different fabric can be used identical structured query language as data and input and manage
The interface of reason.Structured query language sentence can nesting into any programming language, this make it have great flexibility and
Powerful function.
Preferably, after the step S2, include: before S3
S23, judge whether the test file is SQL format, if so, C is thened follow the steps, if it is not, then receiving user will
The suffix name of test file is revised as the instruction of SQL, and saves modified test file.
In the step S23, when user renames test file, the suffix of test file will may be accidentally deleted
Name causes to save failure or messy code occurs in the content of test file.Meanwhile there is also test files to be distorted by wooden horse file
The problem of suffix name, therefore, it is necessary to judge whether the test file is SQL format.
If the entitled SQL of the suffix of test file represents test file then as normal file;If after test file
Sewing name is not SQL, then the suffix name of test file directly can be revised as SQL by user, specifically, can first select to test text
Part renaming, to modify the suffix name of test file.
In the step S3, the Tool for Data Warehouse refers to that Hive, Hive are a data warehouses based on Hadoop
The data file of structuring can be mapped as a database table, and provide simple sql query function by tool, can be incited somebody to action
Sql sentence is converted to MapReduce task and is run.
Preferably, the computer command script document is shell file.
Shell is the program shown a C language, it is the bridge that user uses Linux.Shell is both a kind of life
Language is enabled, and is a kind of programming language.
Shell refers to a kind of application program, this application program provides an interface, and user is accessed by this interface
The service of operating system nucleus.
The sh of Ken Thompson is that the first Unix Shell, Windows Explorer is typical figure circle
Face Shell.
That is, user can input programming language in Shell file (computer command script document) in step S3, wherein
The programming language of input is for calling Tool for Data Warehouse, also, the programming language inputted included the first execution time and second
Execute the time.For example, first executes the time as October 19, second executes the time as October 20.
In the step S4, computer command script document is run, so that Tool for Data Warehouse is called, then, Tool for Data Warehouse
The time is executed according to first in programming language and the second execution time ran historical data again, to obtain implementing result.
Specifically, it obtains and executes the historical data between time and the second execution time first, and pass through the knot
Structure query language executes the historical data acquired, obtains implementing result.
For example, the first execution time was August 19th, the second execution time was August 20th, then obtaining 19 Japanese August of August
Historical data between 20 days, then runs historical data again, to obtain implementing result.
Preferably, the step S4 further include:
Judge whether the value of the first execution time and the value that second executes the time are 0, if so, by the command script
Value and second that the time that file internal defines executes the time as described first execute the value of time.
The purpose of the present invention is obtaining the historical data between the first execution time and the second execution time, then runs and obtain again
The historical data taken.If the value of the first execution time and the value of the second execution time are 0, it is clear that cannot achieve the present invention
Purpose.For various reasons, for example, programming language file is distorted by wooden horse, the value and second for leading to for the first execution time are held
The value of row time is 0, at this point, holding the time defined inside script file as the value and second of the first execution time
The value of row time, i.e., the value of the value for current time being executed into the time as described first and the second execution time.That is, institute
The value and the value of the second execution time for stating for the first execution time are identical.For example, current time is October 19, then obtaining
Corresponding historical data, then ran again and acquired historical data, obtain implementing result October 19.
Referring to Fig. 2, the present invention also provides a kind of electronic equipment 10 comprising:
Processor 110 is adapted for carrying out each instruction, and
Equipment 120 is stored, is suitable for storing a plurality of instruction, described instruction is suitable for being loaded and being executed by processor:
Pre-defined destination path, and test file and computer command script document are created in the destination path;
The instruction of user's input structure query language in the test file is received, and saves the structure of user's input
Change query language;
It receives user and inputs the instruction for calling the programming language of Tool for Data Warehouse in the computer command script document,
And the programming language is saved, the programming language includes that the first execution time and second execute the time;
By running the computer command script document, so that the calling Tool for Data Warehouse, which is based on described first, executes the time
The time execution structured query language is executed with second, obtains implementing result.
The processor 110 can for general processor, digital signal processor (DSP), specific integrated circuit (ASIC),
Field programmable gate array (FPGA), single-chip microcontroller, ARM (Acorn RISC Machine) or other programmable logic device are divided
Any combination of vertical door or transistor logic, discrete hardware component or these components.In addition, processor can also be any
Conventional processors, microprocessor or state machine.Processor also may be implemented as calculating the combination of equipment, for example, DSP and Wei Chu
Manage combination, multi-microprocessor, one or more microprocessors combination DSP core, any other this configuration of device.
It stores equipment 120 and is used as a kind of non-volatile computer readable storage medium storing program for executing, can be used for storing non-volatile software
Program, non-volatile computer executable program and module, as again the realization of language based on programming in the embodiment of the present invention is run
The corresponding program instruction of the method for historical data.Processor is stored in the non-volatile software journey in storage equipment by operation
Sequence, instruction and unit are realized thereby executing language based on programming at the various function application and data of running historical data again
Reason, i.e. language based on programming in realization above method embodiment realize the method for running historical data again.
It about the particular technique details of above-mentioned electronic equipment 10, is described in detail in above-mentioned steps, so not repeating them here.
The present invention also provides a kind of computer program products, wherein computer program product is non-volatile including being stored in
Computer program on computer readable storage medium, computer program include program instruction, when program instruction is held by processor
When row, so that the processor is executed the language based on programming and realize the method for running historical data again.
The present invention also provides a kind of non-volatile computer readable storage medium storing program for executing, wherein the non-volatile computer can
It reads storage medium and is stored with computer executable instructions, when which is executed by one or more processors,
One or more of processors may make to execute the language based on programming and realize the method for running historical data again.
It should be understood that the application of the present invention is not limited to the above for those of ordinary skills can
With improvement or transformation based on the above description, all these modifications and variations all should belong to the guarantor of appended claims of the present invention
Protect range.
Claims (10)
1. a kind of language based on programming realizes the method for running historical data again characterized by comprising
A, destination path is pre-defined, and creates test file and computer command script document in the destination path;
B, the instruction of user's input structure query language in the test file is received, and saves the structuring of user's input
Query language;
C, it receives user and inputs the instruction for calling the programming language of Tool for Data Warehouse in the computer command script document, and
The programming language is saved, the programming language includes that the first execution time and second execute the time;
D, by running the computer command script document so that the callings Tool for Data Warehouse be based on described first execute the time with
Second executes the time execution structured query language, obtains implementing result.
2. language realizes the method for running historical data again based on programming according to claim 1, which is characterized in that the step
In A, the step of pre-defined destination path, is specifically included:
Destination folder is created in a background server in advance, and obtains the destination address of the destination folder, and will
The destination address acquired is defined as the destination path.
3. language realizes the method for running historical data again based on programming according to claim 1, which is characterized in that the step
B is specifically included:
B1, the instruction that user clicks the test file is received, and shows the content of test file by a display interface;
B2, the instruction for receiving user's input structure query language in the display interface, and save the structure of user's input
Change query language.
4. language realizes the method for running historical data again based on programming according to claim 3, which is characterized in that the step
After B2, include: before C
B3, judge whether the test file is SQL format, if so, C is thened follow the steps, if it is not, text will be tested by then receiving user
The suffix name of part is revised as the instruction of SQL, and saves modified test file.
5. language realizes the method for running historical data again based on programming according to claim 1, which is characterized in that the order
Script file is shell file.
6. language realizes the method for running historical data again based on programming according to claim 1, which is characterized in that the step
D is specifically included:
Judge whether the value of the first execution time and the value that second executes the time are 0, if so, by the computer command script document
Value and second that the time that inside defines executes the time as described first execute the value of time.
7. language realizes the method for running historical data again based on programming according to claim 1, which is characterized in that the step
D further include:
It obtains and executes the historical data between time and the second execution time first, and held by the structured query language
The historical data that row acquires, obtains implementing result.
8. a kind of electronic equipment characterized by comprising
Processor is adapted for carrying out each instruction, and
Equipment is stored, is suitable for storing a plurality of instruction, described instruction is suitable for being loaded and being executed by processor:
Pre-defined destination path, and test file and computer command script document are created in the destination path;
The instruction of user's input structure query language in the test file is received, and the structuring for saving user's input is looked into
Ask language;
It receives user to input in the computer command script document for calling the instruction of the programming language of Tool for Data Warehouse, and protects
The programming language is deposited, the programming language includes that the first execution time and second execute the time;
By running the computer command script document, so that the callings Tool for Data Warehouse is based on the first execution time and the
Two execute the time execution structured query language, obtain implementing result.
9. a kind of computer program product, which is characterized in that computer program product can including being stored in non-volatile computer
The computer program on storage medium is read, computer program includes program instruction, when program instruction is executed by processor, makes institute
Stating processor perform claim requires the described in any item language based on programming of 1-7 to realize the method for running historical data again.
10. a kind of non-volatile computer readable storage medium storing program for executing, which is characterized in that the non-volatile computer readable storage medium
Matter is stored with computer executable instructions, when which is executed by one or more processors, may make institute
Stating one or more processors perform claim requires the described in any item language based on programming of 1-7 to realize the side for running historical data again
Method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811261042.5A CN109542873A (en) | 2018-10-26 | 2018-10-26 | A kind of language based on programming realizes the method and electronic equipment of race historical data again |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811261042.5A CN109542873A (en) | 2018-10-26 | 2018-10-26 | A kind of language based on programming realizes the method and electronic equipment of race historical data again |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109542873A true CN109542873A (en) | 2019-03-29 |
Family
ID=65845800
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811261042.5A Pending CN109542873A (en) | 2018-10-26 | 2018-10-26 | A kind of language based on programming realizes the method and electronic equipment of race historical data again |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109542873A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113568936A (en) * | 2021-07-30 | 2021-10-29 | 多点生活(成都)科技有限公司 | Real-time streaming data storage method and device and terminal equipment |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101042751A (en) * | 2007-01-18 | 2007-09-26 | 北京佳讯飞鸿电气有限责任公司 | Implementing method and system for flexible and expandable dynamic statistics |
CN102231676A (en) * | 2011-06-23 | 2011-11-02 | 中兴通讯股份有限公司 | Network management data collecting method and device |
US20130041900A1 (en) * | 2011-08-10 | 2013-02-14 | Bank Of America Corporation | Script Reuse and Duplicate Detection |
CN108170552A (en) * | 2018-01-05 | 2018-06-15 | 武汉斗鱼网络科技有限公司 | A kind of method, apparatus and equipment for capturing Dump files |
-
2018
- 2018-10-26 CN CN201811261042.5A patent/CN109542873A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101042751A (en) * | 2007-01-18 | 2007-09-26 | 北京佳讯飞鸿电气有限责任公司 | Implementing method and system for flexible and expandable dynamic statistics |
CN102231676A (en) * | 2011-06-23 | 2011-11-02 | 中兴通讯股份有限公司 | Network management data collecting method and device |
US20130041900A1 (en) * | 2011-08-10 | 2013-02-14 | Bank Of America Corporation | Script Reuse and Duplicate Detection |
CN108170552A (en) * | 2018-01-05 | 2018-06-15 | 武汉斗鱼网络科技有限公司 | A kind of method, apparatus and equipment for capturing Dump files |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113568936A (en) * | 2021-07-30 | 2021-10-29 | 多点生活(成都)科技有限公司 | Real-time streaming data storage method and device and terminal equipment |
CN113568936B (en) * | 2021-07-30 | 2023-06-13 | 多点生活(成都)科技有限公司 | Real-time stream data storage method, device and terminal equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8694880B2 (en) | Population update framework, systems and methods | |
US8645905B2 (en) | Development artifact searching in an integrated development environment | |
US8478717B2 (en) | Enterprise collaboration with reusable content | |
US9146955B2 (en) | In-memory, columnar database multidimensional analytical view integration | |
US20140250103A1 (en) | Obtaining partial results from a database query | |
US20130166563A1 (en) | Integration of Text Analysis and Search Functionality | |
US11314819B2 (en) | Systems, apparatuses, and method for document ingestion | |
US10929188B2 (en) | Selective and piecemeal data loading for computing efficiency | |
US20140095253A1 (en) | Business process global searching | |
US20140095508A1 (en) | Efficient selection of queries matching a record using a cache | |
CN106599241B (en) | Visual management method for big data in GIS software | |
US20090187551A1 (en) | Search results when searching for records of a business object | |
US20210365428A1 (en) | Integrated data analysis | |
CN109542873A (en) | A kind of language based on programming realizes the method and electronic equipment of race historical data again | |
US11526557B2 (en) | Systems, apparatuses, and methods for providing emphasis in query results | |
US20210158209A1 (en) | Systems, apparatuses, and methods of active learning for document querying machine learning models | |
US8706751B2 (en) | Method for providing a user interface driven by database tables | |
US8442980B2 (en) | Attribute change coalescing in order to deal with component moves on a page | |
CN108459844A (en) | The classification of task processing method and computer equipment of frame are handled based on big data | |
CN109542893A (en) | A kind of the compound data structure setting method and electronic equipment of language based on programming | |
US20050197845A1 (en) | Business workbook precalculation | |
Krishnan et al. | Google app engine | |
CN112579705A (en) | Metadata acquisition method and device, computer equipment and storage medium | |
Troelsen et al. | Exploring Entity Framework Core | |
Betzing | Design and Development of an Event-driven In-memory Business Process Engine |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190329 |
|
RJ01 | Rejection of invention patent application after publication |