CN111831638A - Data table creating method and device - Google Patents

Data table creating method and device Download PDF

Info

Publication number
CN111831638A
CN111831638A CN201910310499.9A CN201910310499A CN111831638A CN 111831638 A CN111831638 A CN 111831638A CN 201910310499 A CN201910310499 A CN 201910310499A CN 111831638 A CN111831638 A CN 111831638A
Authority
CN
China
Prior art keywords
data
data source
database
target
target 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
Application number
CN201910310499.9A
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.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201910310499.9A priority Critical patent/CN111831638A/en
Priority to PCT/CN2020/083092 priority patent/WO2020211657A1/en
Publication of CN111831638A publication Critical patent/CN111831638A/en
Pending legal-status Critical Current

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/22Indexing; Data structures therefor; Storage structures
    • G06F16/2282Tablespace storage structures; Management thereof
    • 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/22Indexing; Data structures therefor; Storage structures
    • 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/28Databases characterised by their database models, e.g. relational or object models
    • 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/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/283Multi-dimensional databases or data warehouses, e.g. MOLAP or ROLAP

Abstract

The disclosure relates to a data table creating method and device. The method comprises the following steps: receiving a data table creating instruction input by a user, wherein the data table creating instruction comprises a data source identifier; determining data structure information in a target data source indicated by the data source identification; and generating a table building statement of the target data source according to the data structure information in the target data source, wherein the table building statement is used for building a data table corresponding to the target data source. The method and the device can avoid manual field input by a user, so that the table building efficiency can be improved.

Description

Data table creating method and device
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method and an apparatus for creating a data table.
Background
Currently, a general database provides a table building statement, for example: the create table entry A like B can be used for copying a new data table B with the same structure but different table names according to an existing data table A in the database by using the table building statement. However, in the case of creating a new data table directly from the original data stored in the database, the user is required to manually input each field in the new data table, resulting in inefficient table creation.
Disclosure of Invention
In view of the above, the present disclosure provides a method and an apparatus for creating a data table, so that a user can avoid manually inputting a field, and thus, the table creating efficiency can be improved.
According to a first aspect of the present disclosure, there is provided a method for creating a data table, including: receiving a data table creating instruction input by a user, wherein the data table creating instruction comprises a data source identifier; determining data structure information in a target data source indicated by the data source identification; and generating a table building statement of the target data source according to the data structure information in the target data source, wherein the table building statement is used for building a data table corresponding to the target data source.
In one possible implementation, determining the data structure information in the target data source indicated by the data source identifier includes: extracting at least one data record stored in the target data source; and determining data structure information in the target data source according to the at least one data record.
In one possible implementation, determining the data structure information in the target data source indicated by the data source identifier includes: and determining each data item in the target data source and a first data type identifier corresponding to any data item as the data structure information.
In one possible implementation manner, generating a table building statement of the target data source according to the data structure information in the target data source includes: determining at least one field in the table building statement according to each data item in the target data source; and determining a second data type identifier of a field corresponding to the data item according to a first data type identifier corresponding to any data item, wherein the data type indicated by the first data type identifier is the same as the data type indicated by the second data type identifier.
In one possible implementation, the second data type identifications determined from the first data type identifications indicating the same data type are the same.
In one possible implementation, the target data source includes at least one of: a database and a storage service having a data storage function.
In one possible implementation, the target data source includes at least one of: the object storage service OSS, the table storage service OTS, the database MySQL, the database SQL Server, the database Postgres, the relational database PolarDB, the distributed document storage database MangoDB and the database Redis.
According to a second aspect of the present disclosure, there is provided a data table creation apparatus, including: the receiving module is used for receiving a data table creating instruction input by a user, wherein the data table creating instruction comprises a data source identifier; the determining module is used for determining the data structure information in the target data source indicated by the data source identification; and the creating module is used for generating a table building statement of the target data source according to the data structure information in the target data source, wherein the table building statement is used for creating a data table corresponding to the target data source.
In one possible implementation, the determining module includes: the extraction submodule is used for extracting at least one data record stored in the target data source; and the first determining submodule is used for determining data structure information in the target data source according to the at least one data record.
In a possible implementation manner, the determining module is specifically configured to: and determining each data item in the target data source and a first data type identifier corresponding to any data item as the data structure information.
In one possible implementation, the creating module includes: a second determining submodule, configured to determine at least one field in the table building statement according to each data item in the target data source; and a third determining submodule, configured to determine, according to a first data type identifier corresponding to any one of the data items, a second data type identifier of a field corresponding to the data item, where a data type indicated by the first data type identifier is the same as a data type indicated by the second data type identifier.
In one possible implementation, the second data type identifications determined from the first data type identifications indicating the same data type are the same.
In one possible implementation, the target data source includes at least one of: a database and a storage service having a data storage function.
In one possible implementation, the target data source includes at least one of: object storage service OSS, table storage service OTS, database MySQL, database SQL Server, database Postgres, relational database PolarDB, distributed document storage database MangoDB, and database Redis
According to a third aspect of the present disclosure, there is provided a data table creation apparatus including: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to execute the method for creating a data table according to the first aspect.
According to a fourth aspect of the present disclosure, there is provided a non-transitory computer readable storage medium having stored thereon computer program instructions, wherein the computer program instructions, when executed by a processor, implement the method of creating a data table of the first aspect described above.
The data structure information in the target data source indicated by the data source identification is determined by receiving a data table creating instruction which is input by a user and comprises the data source identification, and then a table creating statement for creating the data table corresponding to the target data source is automatically generated according to the data structure information in the target data source, so that fields can be prevented from being manually input by the user, and the table creating efficiency can be improved.
Other features and aspects of the present disclosure will become apparent from the following detailed description of exemplary embodiments, which proceeds with reference to the accompanying drawings.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate exemplary embodiments, features, and aspects of the disclosure and, together with the description, serve to explain the principles of the disclosure.
FIG. 1 is a flow diagram illustrating a method for creating a data table according to an embodiment of the present disclosure;
FIG. 2 is a schematic diagram illustrating a method of creating a data table according to an embodiment of the present disclosure;
FIG. 3 is a schematic structural diagram of an apparatus for creating a data table according to an embodiment of the present disclosure;
fig. 4 shows a schematic structural diagram of an electronic device according to an embodiment of the present disclosure.
Detailed Description
Various exemplary embodiments, features and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. In the drawings, like reference numbers can indicate functionally identical or similar elements. While the various aspects of the embodiments are presented in drawings, the drawings are not necessarily drawn to scale unless specifically indicated.
The word "exemplary" is used exclusively herein to mean "serving as an example, embodiment, or illustration. Any embodiment described herein as "exemplary" is not necessarily to be construed as preferred or advantageous over other embodiments.
Furthermore, in the following detailed description, numerous specific details are set forth in order to provide a better understanding of the present disclosure. It will be understood by those skilled in the art that the present disclosure may be practiced without some of these specific details. In some instances, methods, means, elements and circuits that are well known to those skilled in the art have not been described in detail so as not to obscure the present disclosure.
The data lake is a novel data warehouse solution, and the data lake does not store data, but reads data from the underlying data storage when needed by a user. For example, a data lake obtains raw data from multiple data sources of an enterprise, and for different purposes, there may be multiple copies of the same raw data that satisfy a particular internal model format, and thus the data processed in the data lake may be structured data or unstructured data.
Currently, in the data lake field, as set forth in the background section, creating a data table for a data source requires a user to manually enter various fields in the data table, but manually entering fields results in inefficient table creation due to the large number of fields included in the data source (e.g., a business database of an enterprise).
The method for creating the data table can be applied to the data table creation scene in the field of data lakes to automatically generate the table building sentences, avoid manual field input by a user and improve the table building efficiency. The method for creating the data table provided by the present disclosure is described in detail below by taking the field of data lakes as an example. It should be understood by those skilled in the art that the data lake field is only one application scenario example of the present disclosure, and does not constitute a limitation to the present disclosure, and the creation method of the data table provided by the present disclosure may also be applied to other application scenarios.
Fig. 1 is a flowchart illustrating a method for creating a data table according to an embodiment of the present disclosure. As shown in fig. 1, the method may include:
and step S11, receiving a data table creating instruction input by a user, wherein the data table creating instruction comprises a data source identifier.
In step S12, data structure information in the target data source indicated by the data source identification is determined.
Step S13, generating a table building statement of the target data source according to the data structure information in the target data source, where the table building statement is used to create a data table corresponding to the target data source.
When a user wants to create a data table for a target data source, a data table creation instruction including a data source identifier is input to a data lake, and then the data lake determines a data structure in the target data source indicated by the data source identifier, so that a table creation statement for creating the data table corresponding to the target data source can be automatically generated in the data lake according to the data structure information, fields in the data table are prevented from being manually input by the user, and the table creation efficiency is improved.
In one possible implementation, the target data source includes at least one of: a database and a storage service having a data storage function.
The target data source may be a database for storing structured data, a storage service with a data storage function for storing unstructured data, or other data storage, which is not specifically limited by the present disclosure.
In one possible implementation, the target data source includes at least one of: the object storage service OSS, the table storage service OTS, the database MySQL, the database SQL Server, the database Postgres, the relational database PolarDB, the distributed document storage database MangoDB and the database Redis.
Fig. 2 is a flowchart illustrating a method for creating a data table according to an embodiment of the disclosure. As shown in fig. 2, the underlying data sources include an object storage service OSS, a table storage service OTS, a database MySQL, a database SQL Server, a database Postgres, a relational database polar db, a distributed document storage database MangoDB, and a database Redis, and the data lake may create a data table for the underlying data source, so that data in the underlying data source may be queried and read based on the data table.
In an example, the data table creation instruction is Structured Query Language (SQL).
In one example, as shown in FIG. 2, when a user wishes to create a data table for a distributed document storage database, MangoDB (target data source), the user enters a data table creation instruction into a data lake:
create external table data_lake_table like mapping('mongodb_collection')。
wherein, 'mongodb _ collection' is a data source identification for indicating a target data source MangoDB.
In an example, when a user wishes to create a data table for an object storage service OSS (target data source), the user enters a data table creation instruction into a data lake:
create external table data_lake_table like mapping('oss://test-bucket/my-file')。
wherein,' oss: and the// test-packet/my-file' is a data source identifier and is used for indicating the target data source OSS.
In one example, when a user wishes to create a data table for the database MySQL (target data source), the user enters a data table creation instruction into the data lake:
create external table data_lake_table like mapping('mysql_table').
wherein, 'MySQL _ table' is a data source identifier and is used for indicating a target data source MySQL.
The syntax format of the data table creating instruction may be changed according to actual situations, and the present disclosure does not specifically limit this.
For example, when a user wishes to create a data table for the distributed document storage database MangoDB, the data table creation instruction may be, in addition to the above description: create external table data _ lag _ table likemapping mongodb _ collection; or create external table data _ lag _ table likeintersection mongodb _ collection.
In one possible implementation, determining the data structure information in the target data source indicated by the data source identifier includes: determining each data item in the target data source and a first data type identifier corresponding to any data item as data structure information.
After the data lake receives a data table creation instruction which is input by a user and comprises a data source identification, an engine of the data lake can automatically analyze and deduce a data structure in a target data source indicated by the data source identification, and determine data structure information in the target data source: each data item and a first data type identifier corresponding to any data item.
In one possible implementation, determining the data structure information in the target data source indicated by the data source identifier includes: extracting at least one data record stored in a target data source; data structure information in the target data source is determined based on the at least one data record.
Still taking the example of FIG. 2 above, the data lake receives a user-entered data table creation command: after create extra data _ lag _ table like mapping ('mongodb _ collection'), the data lake extracts a data record from the distributed document storage database MangoDB for analysis and derivation, and determines the data structure information in the distributed document storage database MangoDB.
For example, { "_ id": ObjectId ("5c134c3f36d9cf6ad7077043") "" id ":1" name ":" james "", age ":10" create _ time ":" ISODate ("2018-12-14T06:22:54.369Z") is an extracted data record from which a data lake analysis derivation determines that four data items are included in the distributed document storage database, MangoDB: age, creation time create _ time, identification id, and name; the first data type identifier corresponding to the age is a double, and the data type used for indicating is a double-precision floating point type; creating a first data type identifier corresponding to the time _ time as a timestamp, wherein the first data type identifier is used for indicating that the data type is a timestamp character sequence type; a first data type identifier corresponding to the identifier id is a double, and the data type used for indicating is a double-precision floating point type; the first data type identifier corresponding to the name is varchar, and the data type used for indicating is a character string type.
In one possible implementation, generating a table building statement of a data source according to data structure information in a target data source includes: determining at least one field in the table building statement according to each data item in the target data source; and determining a second data type identifier of a field corresponding to any data item according to a first data type identifier corresponding to the data item, wherein the data type indicated by the first data type identifier is the same as the data type indicated by the second data type identifier.
In one possible implementation, the second data type identifications determined from the first data type identifications indicating the same data type are the same.
The first data type identification indicating the same data type may not be the same in different data sources. For example, in the distributed document storage database, MangoDB, the first data type indicating the string type is identified as string, while in the database, MySQL, the first data type indicating the string type is identified as varchar. The data lake uniformly maps different first data type identifications indicating the same data type, that is, when the second data type identification of the field corresponding to any data item is determined according to the first data type identification corresponding to the data item, the second data type identifications determined according to the first data type identifications indicating the same data type are the same.
For example, in the data lake, a second data type indicating a string type is identified as varchar. When a data table corresponding to a distributed document storage database MangoDB is created, aiming at a data item of which a first data type identifier is string (used for indicating a character string type) in the distributed document storage database MangoDB, determining that a second data type identifier of a field corresponding to the data item is varchar; when a data table corresponding to the database MySQL is created, aiming at a data item of which the first data type identifier in the database MySQL is varchar (used for indicating a character string type), determining that the second data type identifier of a field corresponding to the data item is still varchar.
Still taking the example of fig. 2 as above, after the data structure information in the distributed document storage database MangoDB determined by the data lake, a table building statement for creating a data table corresponding to the distributed document storage database MangoDB is automatically generated according to the data structure information.
For example, the table building statement used to create a data table corresponding to the distributed document storage database MangoDB is:
CREATE EXTERNAL TABLE 'data _ lag _ Table',// CREATE a data TABLE in the data lake;
'age' double NULL COMMENT,// create a field age, the data type is double precision floating point type;
'create _ time' time NULL command,// create a field create _ time, the data type is a timestamp character sequence type;
'id' double NULL COMMENT,// create a field id, data type is double precision floating point type;
'name' varchar NULL COMMENT,// create a field name, the data type is string type;
TBLPROPERTIES(TABLE_MAPPING='mongo_test.mongo_collection')。
and the data lake creates a data table corresponding to the target data source based on the table building statement, and then the user can query the data in the target data source based on the data table in the data lake.
Still taking the above-mentioned fig. 2 as an example, after the data lake automatically generates the table building statement for creating the data table corresponding to the distributed document storage database MangoDB, the data table corresponding to the distributed document storage database MangoDB is created based on the table building statement. When the data lake receives a data query instruction which is input by a user and aims at the distributed document storage database MangoDB, the data lake can query the data in the distributed document storage database MangoDB based on the data table.
The data structure information in the target data source indicated by the data source identification is determined by receiving a data table creating instruction which is input by a user and comprises the data source identification, and then a table creating statement for creating the data table corresponding to the target data source is automatically generated according to the data structure information in the target data source, so that fields can be prevented from being manually input by the user, and the table creating efficiency can be improved.
Fig. 3 is a schematic structural diagram of a data table creation apparatus according to an embodiment of the present disclosure. The apparatus 30 shown in fig. 3 may be used to perform the steps of the method embodiment shown in fig. 1, the apparatus 30 comprising:
a receiving module 31, configured to receive a data table creating instruction input by a user, where the data table creating instruction includes a data source identifier;
a determining module 32, configured to determine data structure information in the target data source indicated by the data source identifier;
and the creating module 33 is configured to generate a table building statement of the target data source according to the data structure information in the target data source, where the table building statement is used to create a data table corresponding to the target data source.
In one possible implementation, the determining module 32 includes:
the extraction submodule is used for extracting at least one data record stored in the target data source;
and the first determining submodule is used for determining the data structure information in the target data source according to the at least one data record.
In one possible implementation, the determining module 32 is specifically configured to:
determining each data item in the target data source and a first data type identifier corresponding to any data item as data structure information.
In one possible implementation, the creating module 33 includes:
the second determining submodule is used for determining at least one field in the table building statement according to each data item in the target data source;
and the third determining submodule is used for determining a second data type identifier of a field corresponding to any data item according to the first data type identifier corresponding to the data item, wherein the data type indicated by the first data type identifier is the same as the data type indicated by the second data type identifier.
In one possible implementation, the second data type identifications determined from the first data type identifications indicating the same data type are the same.
In one possible implementation, the target data source includes at least one of:
a database and a storage service having a data storage function.
In one possible implementation, the target data source includes at least one of:
the object storage service OSS, the table storage service OTS, the database MySQL, the database SQL Server, the database Postgres, the relational database PolarDB, the distributed document storage database MangoDB and the database Redis.
The apparatus 30 provided in the present disclosure can implement each step in the method embodiment shown in fig. 1, and implement the same technical effect, and is not described herein again to avoid repetition.
Fig. 4 shows a schematic structural diagram of an electronic device according to an embodiment of the present disclosure. As shown in fig. 4, at the hardware level, the electronic device includes a processor, and optionally further includes an internal bus, a network interface, and a memory. The Memory may include a Memory, such as a Random-Access Memory (RAM), and may further include a non-volatile Memory, such as at least 1 disk Memory. Of course, the electronic device may also include hardware required for other services.
The processor, the network interface, and the memory may be connected to each other via an internal bus, which may be an ISA (Industry Standard Architecture) bus, a PCI (peripheral component Interconnect) bus, an EISA (Extended Industry Standard Architecture) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one double-headed arrow is shown in FIG. 4, but that does not indicate only one bus or one type of bus.
And a memory for storing the program. In particular, the program may include program code comprising computer operating instructions. The memory may include both memory and non-volatile storage and provides instructions and data to the processor.
The processor reads the corresponding computer program from the nonvolatile memory into the memory and then runs the computer program to form a data table creating device on a logic level. The processor executes the program stored in the memory and specifically executes: receiving a data table creating instruction input by a user, wherein the data table creating instruction comprises a data source identifier; determining data structure information in a target data source indicated by the data source identification; and generating a table building statement of the target data source according to the data structure information in the target data source, wherein the table building statement is used for building a data table corresponding to the target data source.
In one possible implementation, the processor is specifically configured to perform: extracting at least one data record stored in a target data source; data structure information in the target data source is determined based on the at least one data record.
In one possible implementation, the processor is specifically configured to perform: determining each data item in the target data source and a first data type identifier corresponding to any data item as data structure information.
In one possible implementation, the processor is specifically configured to perform: determining at least one field in the table building statement according to each data item in the target data source; and determining a second data type identifier of a field corresponding to any data item according to a first data type identifier corresponding to the data item, wherein the data type indicated by the first data type identifier is the same as the data type indicated by the second data type identifier.
In one possible implementation, the second data type identifications determined from the first data type identifications indicating the same data type are the same.
In one possible implementation, the target data source includes at least one of: a database and a storage service having a data storage function.
In one possible implementation, the target data source includes at least one of: the object storage service OSS, the table storage service OTS, the database MySQL, the database SQL Server, the database Postgres, the relational database PolarDB, the distributed document storage database MangoDB and the database Redis.
The processor may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware in a processor or instructions in the form of software. The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components. The various methods, steps and logic blocks disclosed in the embodiments of the present specification may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of a method disclosed in connection with the embodiments of the present specification may be embodied directly in a hardware decoding processor, or in a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in a memory, and a processor reads information in the memory and completes the steps of the method in combination with hardware of the processor.
The electronic device may execute the method executed in the method embodiment shown in fig. 1, and implement the functions of the method embodiment shown in fig. 1, which are not described herein again in this specification.
The present specification also proposes a computer-readable storage medium storing one or more programs, where the one or more programs include instructions, which when executed by an electronic device including a plurality of application programs, can cause the electronic device to execute the method for creating a data table in the embodiment shown in fig. 1, and specifically execute the steps of the embodiment of the method shown in fig. 1.
The present disclosure may be systems, methods, and/or computer program products. The computer program product may include a computer-readable storage medium having computer-readable program instructions embodied thereon for causing a processor to implement various aspects of the present disclosure.
The computer readable storage medium may be a tangible device that can hold and store the instructions for use by the instruction execution device. The computer readable storage medium may be, for example, but not limited to, an electronic memory device, a magnetic memory device, an optical memory device, an electromagnetic memory device, a semiconductor memory device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a Static Random Access Memory (SRAM), a portable compact disc read-only memory (CD-ROM), a Digital Versatile Disc (DVD), a memory stick, a floppy disk, a mechanical coding device, such as punch cards or in-groove projection structures having instructions stored thereon, and any suitable combination of the foregoing. Computer-readable storage media as used herein is not to be construed as transitory signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide or other transmission medium (e.g., optical pulses through a fiber optic cable), or electrical signals transmitted through electrical wires.
The computer-readable program instructions described herein may be downloaded from a computer-readable storage medium to a respective computing/processing device, or to an external computer or external storage device via a network, such as the internet, a local area network, a wide area network, and/or a wireless network. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers and/or edge servers. The network adapter card or network interface in each computing/processing device receives computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in the respective computing/processing device.
The computer program instructions for carrying out operations of the present disclosure may be assembler instructions, Instruction Set Architecture (ISA) instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source or object code written in any combination of one or more programming languages, including an object oriented programming language such as Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider). In some embodiments, the electronic circuitry that can execute the computer-readable program instructions implements aspects of the present disclosure by utilizing the state information of the computer-readable program instructions to personalize the electronic circuitry, such as a programmable logic circuit, a Field Programmable Gate Array (FPGA), or a Programmable Logic Array (PLA).
Various aspects of the present disclosure are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the disclosure. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer-readable program instructions.
These computer-readable program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks. These computer-readable program instructions may also be stored in a computer-readable storage medium that can direct a computer, programmable data processing apparatus, and/or other devices to function in a particular manner, such that the computer-readable medium storing the instructions comprises an article of manufacture including instructions which implement the function/act specified in the flowchart and/or block diagram block or blocks.
The computer readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer implemented process such that the instructions which execute on the computer, other programmable apparatus or other devices implement the functions/acts specified in the flowchart and/or block diagram block or blocks.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Having described embodiments of the present disclosure, the foregoing description is intended to be exemplary, not exhaustive, and not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terms used herein were chosen in order to best explain the principles of the embodiments, the practical application, or technical improvements to the techniques in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein.

Claims (16)

1. A method for creating a data table, comprising:
receiving a data table creating instruction input by a user, wherein the data table creating instruction comprises a data source identifier;
determining data structure information in a target data source indicated by the data source identification;
and generating a table building statement of the target data source according to the data structure information in the target data source, wherein the table building statement is used for building a data table corresponding to the target data source.
2. The method of claim 1, wherein determining the data structure information in the target data source indicated by the data source identification comprises:
extracting at least one data record stored in the target data source;
and determining data structure information in the target data source according to the at least one data record.
3. The method of claim 1 or 2, wherein determining the data structure information in the target data source indicated by the data source identification comprises:
and determining each data item in the target data source and a first data type identifier corresponding to any data item as the data structure information.
4. The method of claim 3, wherein generating the table building statement of the target data source according to the data structure information in the target data source comprises:
determining at least one field in the table building statement according to each data item in the target data source;
and determining a second data type identifier of a field corresponding to the data item according to a first data type identifier corresponding to any data item, wherein the data type indicated by the first data type identifier is the same as the data type indicated by the second data type identifier.
5. The method of claim 4, wherein the second data type identifiers determined from the first data type identifiers indicating the same data type are the same.
6. The method of claim 1, wherein the target data source comprises at least one of:
a database and a storage service having a data storage function.
7. The method of claim 1, wherein the target data source comprises at least one of:
the object storage service OSS, the table storage service OTS, the database MySQL, the database SQL Server, the database Postgres, the relational database PolarDB, the distributed document storage database MangoDB and the database Redis.
8. An apparatus for creating a data table, comprising:
the receiving module is used for receiving a data table creating instruction input by a user, wherein the data table creating instruction comprises a data source identifier;
the determining module is used for determining the data structure information in the target data source indicated by the data source identification;
and the creating module is used for generating a table building statement of the target data source according to the data structure information in the target data source, wherein the table building statement is used for creating a data table corresponding to the target data source.
9. The apparatus of claim 1, wherein the determining module comprises:
the extraction submodule is used for extracting at least one data record stored in the target data source;
and the first determining submodule is used for determining data structure information in the target data source according to the at least one data record.
10. The apparatus according to claim 8 or 9, wherein the determining module is specifically configured to:
and determining each data item in the target data source and a first data type identifier corresponding to any data item as the data structure information.
11. The apparatus of claim 10, wherein the creation module comprises:
a second determining submodule, configured to determine at least one field in the table building statement according to each data item in the target data source;
and a third determining submodule, configured to determine, according to a first data type identifier corresponding to any one of the data items, a second data type identifier of a field corresponding to the data item, where a data type indicated by the first data type identifier is the same as a data type indicated by the second data type identifier.
12. The apparatus of claim 11, wherein the second data type identifiers determined from the first data type identifiers indicating the same data type are the same.
13. The apparatus of claim 8, wherein the target data source comprises at least one of:
a database and a storage service having a data storage function.
14. The apparatus of claim 8, wherein the target data source comprises at least one of:
the object storage service OSS, the table storage service OTS, the database MySQL, the database SQL Server, the database Postgres, the relational database PolarDB, the distributed document storage database MangoDB and the database Redis.
15. An apparatus for creating a data table, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to perform the method of creating a data table of any of claims 1-7.
16. A non-transitory computer readable storage medium having stored thereon computer program instructions, wherein the computer program instructions, when executed by a processor, implement the method of creating a data table of any of claims 1-7.
CN201910310499.9A 2019-04-17 2019-04-17 Data table creating method and device Pending CN111831638A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201910310499.9A CN111831638A (en) 2019-04-17 2019-04-17 Data table creating method and device
PCT/CN2020/083092 WO2020211657A1 (en) 2019-04-17 2020-04-03 Method and device for creating data table

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910310499.9A CN111831638A (en) 2019-04-17 2019-04-17 Data table creating method and device

Publications (1)

Publication Number Publication Date
CN111831638A true CN111831638A (en) 2020-10-27

Family

ID=72838062

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910310499.9A Pending CN111831638A (en) 2019-04-17 2019-04-17 Data table creating method and device

Country Status (2)

Country Link
CN (1) CN111831638A (en)
WO (1) WO2020211657A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113076320A (en) * 2021-04-20 2021-07-06 北京沃东天骏信息技术有限公司 Method, device, equipment and computer readable medium for configuring data table

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105608088A (en) * 2014-11-19 2016-05-25 中国航空工业集团公司西安飞机设计研究所 Method for automatically creating database and dynamically recording data on the basis of configuration file
US20170091298A1 (en) * 2015-09-25 2017-03-30 International Business Machines Corporation Replicating structured query language (sql) in a heterogeneous replication environment
CN108170809A (en) * 2017-12-28 2018-06-15 平安科技(深圳)有限公司 Build table scenario generation method, device, equipment and computer readable storage medium
CN108197091A (en) * 2016-12-08 2018-06-22 腾讯科技(深圳)有限公司 A kind of method, system and relevant device for creating tables of data
CN108241670A (en) * 2016-12-26 2018-07-03 北京国双科技有限公司 Database statement generation method and device

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101661508B (en) * 2009-09-29 2012-08-22 金蝶软件(中国)有限公司 Method for generating memu for multi-technology platform and device thereof
CN104899045B (en) * 2015-06-23 2019-07-16 上海斐讯数据通信技术有限公司 A kind of general Software Coding auxiliary system and method
JP6582819B2 (en) * 2015-09-29 2019-10-02 Zekko株式会社 Database linkage system and database linkage program

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105608088A (en) * 2014-11-19 2016-05-25 中国航空工业集团公司西安飞机设计研究所 Method for automatically creating database and dynamically recording data on the basis of configuration file
US20170091298A1 (en) * 2015-09-25 2017-03-30 International Business Machines Corporation Replicating structured query language (sql) in a heterogeneous replication environment
CN108197091A (en) * 2016-12-08 2018-06-22 腾讯科技(深圳)有限公司 A kind of method, system and relevant device for creating tables of data
CN108241670A (en) * 2016-12-26 2018-07-03 北京国双科技有限公司 Database statement generation method and device
CN108170809A (en) * 2017-12-28 2018-06-15 平安科技(深圳)有限公司 Build table scenario generation method, device, equipment and computer readable storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113076320A (en) * 2021-04-20 2021-07-06 北京沃东天骏信息技术有限公司 Method, device, equipment and computer readable medium for configuring data table

Also Published As

Publication number Publication date
WO2020211657A1 (en) 2020-10-22

Similar Documents

Publication Publication Date Title
US11151151B2 (en) Integration template generation
US10078654B2 (en) Data logging framework
CN110688544A (en) Method, device and storage medium for querying database
US20160019266A1 (en) Query generating method and query generating device
CN110647562A (en) Data query method and device, electronic equipment and storage medium
CN114090671A (en) Data import method and device, electronic equipment and storage medium
CN111831638A (en) Data table creating method and device
US20170124219A1 (en) Determining data field offsets using a document object model representation
CN111694992A (en) Data processing method and device
CN112486492A (en) Page generation method and device, storage medium and electronic equipment
US10430393B2 (en) Generating a database structure from a scanned drawing
CN112069267A (en) Data processing method and device
WO2016131295A1 (en) Northbound data conversion method and device
CN115774750A (en) Database lake entering configuration method and system, electronic equipment and storage medium
US9495147B2 (en) Method and apparatus for obtaining context information for a software development task
CN111339035B (en) Target data query method and device, computer equipment and storage medium
CN116107971A (en) Model data processing method and device, electronic equipment and storage medium
CN109286823B (en) Multimedia content acquisition method and device
CN111666278A (en) Data storage method, data retrieval method, electronic device and storage medium
CN111752912A (en) Data processing method and device
CN111722785A (en) Cache updating method and device
CN116483735B (en) Method, device, storage medium and equipment for analyzing influence of code change
CN117172206B (en) Test case generation method and device, electronic equipment and storage medium
CN116483499A (en) Page layout acquisition method, system, medium and device
CN111459398A (en) Data processing method and device for distributed system

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