SQL-based data processing method, device and equipment

By combining SQL, HBase virtual tables and Hive tables to generate physical execution plans in Calcite, and using Hadoop Yarn to directly import Hive databases from HBase entity tables, the problem of low efficiency of data import from HBase to Hive is solved, the operation process is simplified and the server cost is reduced. load, improving data import efficiency.

CN112632170BActive Publication Date: 2024-09-06SHANGHAI ZHONGTONGJI NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011610689.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-30
Publication Date
2024-09-06
Estimated Expiration
2040-12-30

AI Technical Summary

Technical Problem

In the existing technology, the efficiency of importing data from the HBase database into the Hive database is not high. Manual establishment of Hive external tables requires redundant operations and high server load. Using HBase Snapshot is cumbersome to configure and cannot implement advanced data operations.

Method used

Adopt SQL-based data processing method and combine user-written decimal SQL, HBase virtual table and Hive table in Calcite to generate physical execution plan, and use Hadoop Yarn scheduling to directly read data from HBase entity table and write it to Hive table to avoid direct requests to the HBase Region Server.

Benefits of technology

It simplifies the data import process, reduces server load, improves data import efficiency, relieves users of the burden of manual configuration, and saves labor costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112632170B
    Figure CN112632170B
Patent Text Reader

Abstract

The present invention relates to a data processing method, device and equipment based on SQL. The method comprises obtaining a number extraction SQL written by a user, and calling a pre-created Hive table and an HBase virtual table from a metadata database; the HBase virtual table is used to map an HBase entity table; in Calcite, the number extraction SQL, the HBase virtual table and the Hive table are combined to generate a physical execution plan, and the physical execution plan is sent to Hadoop Yarn; the physical execution plan is scheduled by Yarn to read the data in the HBase entity table and write it into the Hive table. The extracted data does not pass through the HBase Region Server, thus avoiding the pressure on the HBase service. The user only needs to write a simple number extraction SQL on the scheduling platform, which saves labor costs and effectively improves the efficiency of importing data from the HBase database to the Hive database.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a SQL-based data processing method, device and equipment. Background Art

[0002] In the process of data processing, it is necessary to frequently import data from the HBase database into the Hive database. In the prior art, this is generally achieved by manually creating a Hive external table corresponding to the HBase table, or by using HBaseSnapshot.

[0003] However, manually creating a Hive external table corresponding to the HBase table is not only redundant and inefficient, but the Hive external table also requires a full table scan of HBase, generating a large number of requests to the HBase Region Server, resulting in excessive server load during task execution; the method of using HBase Snapshot to achieve this is cumbersome to manually configure. For example, it is necessary to configure fields and filtering conditions, etc., and it is impossible to achieve advanced data extraction requirements such as aggregation, union, and sorting. If the business requirements change significantly, the execution logic of the program needs to be modified.

[0004] Therefore, the efficiency of importing data from the HBase database into the Hive database is not high at present. Summary of the invention

[0005] In view of this, the purpose of the present invention is to provide a SQL-based data processing method, device and equipment to overcome the problem that the efficiency of importing data from the current HBase database into the Hive database is not high.

[0006] To achieve the above objectives, the present invention adopts the following technical solutions:

[0007] A data processing method based on SQL, comprising:

[0008] Obtain the extraction SQL written by the user based on actual needs, and retrieve the pre-created Hive table and HBase virtual table from the metadata database; wherein the HBase virtual table is used to map the HBase physical table;

[0009] In Calcite, a physical execution plan is generated by combining the extraction SQL, the HBase virtual table, and the Hive table, and the physical execution plan is sent to Hadoop Yarn;

[0010] The physical execution plan is scheduled by using the Hadoop Yarn to read the data in the HBase entity table and write it into the Hive table.

[0011] Furthermore, the above-mentioned SQL-based data processing method, in Calcite, combines the extraction SQL, the HBase virtual table, and the Hive table to generate a physical execution plan, and sends the physical execution plan to Hadoop Yarn, including:

[0012] In the Calcite, a logical execution plan is generated by combining the extraction SQL, the HBase virtual table, and the Hive table;

[0013] Optimizing the logic execution plan based on fixed rules in the Calcite and custom rules pre-registered in the Calcite;

[0014] A physical converter pre-registered in the Calcite is called to convert the optimized logical execution plan into the physical execution plan.

[0015] Furthermore, the above-mentioned SQL-based data processing method, in the Calcite, combines the extraction SQL, the HBase virtual table, and the Hive table to generate a logical execution plan, including:

[0016] In the Calcite, based on the sampling SQL, basic information of the HBase virtual table and the Hive table is verified;

[0017] After verification, the extraction SQL is converted into the logical execution plan.

[0018] Furthermore, the above-mentioned SQL-based data processing method further includes:

[0019] Obtaining the initial custom rules written by the user based on actual needs;

[0020] Control the initial custom rule to inherit the RelOptRule class and implement onMatch;

[0021] The initial custom rule implementing onMatch is registered in the Calcite through the class implementing the RelNode interface to obtain the custom rule.

[0022] Furthermore, the above-mentioned SQL-based data processing method further includes:

[0023] Get the initial physical converter;

[0024] Control the initial physical converter to inherit the ConverterImpl class and implement the EnumerableRel interface;

[0025] The initial physical converter that implements the numerableRel interface is registered in the Calcite through the class that implements the RelNode interface to obtain the physical converter.

[0026] Further, in the above-mentioned SQL-based data processing method, the physical converter includes a MapReduce physical converter, and the physical execution plan includes a MapReduce execution tree;

[0027] The step of using the Hadoop Yarn to schedule the physical execution plan and reading the data in the HBase entity table and writing the data in the Hive table includes:

[0028] Using the Hadoop Yarn to schedule the physical execution plan, obtaining a snapshot of the HBase entity table;

[0029] Based on the snapshot, using the Hadoop Yarn to schedule the Mapper of the MapReduce execution tree to read the data in the HBase entity table;

[0030] The Hadoop Yarn is used to schedule the Reducer in the MapReduce execution tree to process the data and write the data into the Hive table.

[0031] The present invention also provides a SQL-based data processing device, comprising:

[0032] The acquisition module is used to obtain the extraction SQL written by the user based on actual needs, and to retrieve the pre-created Hive table and HBase virtual table from the metadata database; wherein the HBase virtual table is used to map the HBase physical table;

[0033] Calcite module, used for generating a physical execution plan in Calcite by combining the extraction SQL, the HBase virtual table, and the Hive table, and sending the physical execution plan to Hadoop Yarn;

[0034] The physical execution module is used to schedule the physical execution plan by using the Hadoop Yarn, and read the data in the HBase entity table and write it into the Hive table.

[0035] Furthermore, in the above-mentioned SQL-based data processing device, the Calcite module is specifically used to generate a logical execution plan in the Calcite by combining the extraction SQL, the HBase virtual table, and the Hive table; optimize the logical execution plan based on the fixed rules in the Calcite and the custom rules pre-registered in the Calcite; and call the physical converter pre-registered in the Calcite to convert the optimized logical execution plan into the physical execution plan.

[0036] Further, in the above-mentioned SQL-based data processing device, the physical converter includes a MapReduce physical converter, and the physical execution plan includes a MapReduce execution tree;

[0037] The physical execution module is specifically used to use the Hadoop Yarn to schedule the physical execution plan to obtain a snapshot of the HBase entity table; based on the snapshot, use the Hadoop Yarn to schedule the Mapper of the MapReduce execution tree to read the data in the HBase entity table; use the Hadoop Yarn to schedule the Reducer in the MapReduce execution tree to process the data and write it into the Hive table.

[0038] The present invention also provides a SQL-based data processing device, comprising a processor and a memory, wherein the processor is connected to the memory:

[0039] Wherein, the processor is used to call and execute the program stored in the memory;

[0040] The memory is used to store the program, and the program is at least used to execute any one of the above SQL-based data processing methods.

[0041] The SQL-based data processing method, device and equipment of the present invention include obtaining the extraction SQL written by the user based on actual needs, and calling the pre-created Hive table and HBase virtual table from the metadata library; wherein the HBase virtual table is used to map the HBase entity table; in Calcite, the extraction SQL, HBase virtual table and Hive table are combined to generate a physical execution plan, and the physical execution plan is sent to Hadoop Yarn; Hadoop Yarn is used to schedule the physical execution plan, and the data in the HBase entity table is read and written into the Hive table. With the technical solution of the present application, the data is extracted without passing through the HBaseRegion Server, avoiding the pressure on the HBase service. The user only needs to write a simple extraction SQL on the scheduling platform to realize the data extraction, freeing the user's hands, saving labor costs, and effectively improving the efficiency of importing data from the HBase database into the Hive database. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0043] Figure 1 It is a flow chart provided by an embodiment of the SQL-based data processing method of the present invention;

[0044] Figure 2 It is a structural diagram provided by an embodiment of a data processing device based on SQL of the present invention;

[0045] Figure 3 This is an architecture diagram provided by an embodiment of a data processing device based on SQL of the present invention;

[0046] Figure 4 It is a structural diagram provided by an embodiment of a data processing device based on SQL of the present invention. DETAILED DESCRIPTION

[0047] To make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be described in detail below. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other implementation methods obtained by ordinary technicians in this field without creative work belong to the scope of protection of the present invention.

[0048] Figure 1This is a flow chart provided by an embodiment of the SQL-based data processing method of the present invention.

[0049] like Figure 1 As shown, the SQL-based data processing method of this embodiment may include the following steps:

[0050] S101, obtaining the extraction SQL written by the user based on actual needs, and calling the pre-created Hive table and HBase virtual table from the metadata database.

[0051] Hive is a data warehouse framework built on Hadoop. It implements SQL-like statements HQL to operate large-scale data in Hadoop Distributed File System (HDFS) by setting up a layer of SQL operation interface. Hive can convert SQL into MapReduce tasks. HBase, the full name of Hadoop Database, is a highly reliable, high-performance, column-oriented, scalable distributed storage system. Using HBase technology, a large-scale structured storage cluster can be built on a cheap PC Server.

[0052] Optionally, users can write the extraction SQL according to actual writing requirements. For example, write insert intohive_table select c1,c2 from hbase_table where c3>'2020-11-2600:00:00' as the extraction SQL.

[0053] Optionally, before this, users need to create Hive tables and HBase virtual tables in the metadata system and specify the field types of each table. The HBase virtual table here is a virtual table with a schema, a primary key and fixed columns. It cannot be directly mapped to the HBase database, but is mapped to the HBase entity table.

[0054] Optionally, in this embodiment, the extraction SQL written by the user based on actual needs is obtained, and the pre-created Hive table and HBase virtual table are retrieved from the metadata repository.

[0055] S102. In Calcite, a physical execution plan is generated by combining the SQL statements, HBase virtual tables, and Hive tables, and the physical execution plan is sent to Hadoop Yarn.

[0056] Optionally, in this embodiment, the physical execution plan is determined based on the following steps:

[0057] Step 1: In Calcite, combine the SQL statements, HBase virtual tables, and Hive tables to generate a logical execution plan.

[0058] Step 2: Optimize the logical execution plan based on the fixed rules in Calcite and the custom rules pre-registered in Calcite.

[0059] Step 3: Call the pre-registered physical converter in Calcite to convert the optimized logical execution plan into a physical execution plan.

[0060] Specifically, Calcite is a new query engine for Hadoop, which provides standard SQL language, multiple query optimizations, and the ability to connect to various data sources. It can convert SQL into a logical execution plan, and a third party can adapt the SQL logical plan to a specific physical execution plan based on the physical execution engine, and the physical execution engine will execute this physical execution plan. Finally, the execution result is returned.

[0061] In this embodiment, based on the sampling SQL, the basic information of the HBase virtual table and the Hive table is verified in Calcite, and a logical execution plan is generated. Specifically, Calcite is used to perform lexical analysis and syntax analysis on the sampling SQL, call the metadata system, verify information such as tables and fields, and convert the sampling SQL into a logical execution plan after the verification passes.

[0062] The physical converter includes a MapReduce physical converter, and the physical execution plan includes a MapReduce execution tree. In this embodiment, the fixed rules in Calcite and the custom rules pre-registered in Calcite are used to optimize the logical execution plan, and finally the MapReduce physical converter pre-registered in Calcite is called to convert the optimized logical execution plan into a MapReduce execution tree.

[0063] Optionally, fixed rules are rules built into Calcite.

[0064] Optionally, send the MapReduce execution tree to Hadoop YARN.

[0065] S103, using Hadoop Yarn to schedule the physical execution plan, reading the data in the HBase entity table and writing it into the Hive table.

[0066] Once Hadoop Yarn receives the MapReduce execution tree, it will run the MapReduce execution tree. The running steps are as follows:

[0067] Step 1: Use Hadoop Yarn to schedule the physical execution plan and obtain a snapshot of the HBase entity table;

[0068] Step 2: Based on the snapshot, use Hadoop Yarn to schedule the Mapper of the MapReduce execution tree to read the data in the HBase entity table;

[0069] Step 3: Use Hadoop Yarn to schedule the Reducer in the MapReduce execution tree to process the data and write it to the Hive table.

[0070] Specifically, you can first get a snapshot of the HBase entity table. The Mapper in the MapReduce execution tree uses a custom InputFormat to internally treat each file (HFile) of the HBase entity table as a map input and divide the number of reduce operations according to the size of the table. Then the Reducer in the MapReduce execution tree performs filtering, aggregation and other operations, and finally imports the data into the Hive table according to the table and partition provided in the extraction SQL.

[0071] The SQL-based data processing method of this embodiment includes obtaining the extraction SQL written by the user based on actual needs, and retrieving the pre-created Hive table and HBase virtual table from the metadata library; wherein the HBase virtual table is used to map the HBase entity table; in Calcite, the extraction SQL, HBase virtual table, and Hive table are combined to generate a physical execution plan, and the physical execution plan is sent to Hadoop Yarn; Hadoop Yarn is used to schedule the physical execution plan, and the data in the HBase entity table is read and written into the Hive table. With the technical solution of this application, the data is extracted without passing through the HBase Region Server, avoiding the pressure on the HBase service. The user only needs to write a simple extraction SQL on the scheduling platform to realize the data extraction, which frees the user's hands, saves labor costs, and effectively improves the efficiency of importing data from the HBase database to the Hive database.

[0072] Optionally, based on the above embodiment, this embodiment may further include the following steps:

[0073] Step 1: Obtain the initial custom rules written by the user based on actual needs;

[0074] Step 2: Control the initial custom rule to inherit the RelOptRule class and implement onMatch;

[0075] Step 3: Register the initial custom rule that implements onMatch to Calcite through the class that implements the RelNode interface to obtain the custom rule.

[0076] Specifically, users can write initial custom rules based on actual needs. The initial custom rules implement the onMatch method by inheriting the RelOptRule class. The initial custom rules that implement onMatch are registered in Calcite through a class that implements the RelNode interface.

[0077] Optionally, based on the above embodiment, this embodiment may further include the following steps:

[0078] Step 1: Get the initial physical converter;

[0079] Step 2: Control the initial physical converter to inherit the ConverterImpl class and implement the EnumerableRel interface;

[0080] Step 3: Register the initial physical converter that implements the EnumerableRel interface to Calcite through the class that implements the RelNode interface to obtain the physical converter.

[0081] Specifically, the initial physical converter can be obtained. The initial physical converter implements the EnumerableRel interface by inheriting the ConverterImpl class. The initial physical converter that implements the EnumerableRel interface is registered in Calcite through a class that implements the RelNode interface.

[0082] Optionally, when Calcite optimizes the logical execution plan, it will apply fixed rules and custom rules to optimize the logical execution plan, and use the physical converter to convert the logical execution plan into the final physical execution plan, that is, the MapReduce execution tree. Finally, this MapReduce execution tree is submitted to Hadoop Yarn, which is scheduled for execution.

[0083] Based on a general inventive concept, the present invention also provides a SQL-based data processing device for implementing the above method embodiment.

[0084] Figure 2 1 is a schematic diagram of a structure provided by an embodiment of a data processing device based on SQL of the present invention. Figure 2 As shown, the device of this embodiment may include:

[0085] The acquisition module 11 is used to obtain the extraction SQL written by the user based on actual needs, and to retrieve the pre-created Hive table and HBase virtual table from the metadata database; wherein the HBase virtual table is used to map the HBase physical table;

[0086] Calcite module 12, used to generate a physical execution plan in Calcite by combining the SQL, HBase virtual table, and Hive table, and send the physical execution plan to Hadoop Yarn;

[0087] The physical execution module 13 is used to schedule the physical execution plan by using Hadoop Yarn, and read the data in the HBase entity table and write it into the Hive table.

[0088] Optionally, in the SQL-based data processing device of this embodiment, the Calcite module 12 is specifically used to generate a logical execution plan in Calcite by combining the sampled SQL, HBase virtual table, and Hive table; optimize the logical execution plan based on fixed rules in Calcite and custom rules pre-registered in Calcite; and call the physical converter pre-registered in Calcite to convert the optimized logical execution plan into a physical execution plan.

[0089] Optionally, in the SQL-based data processing device of this embodiment, the Calcite module 12 is specifically used to verify the basic information of the HBase virtual table and the Hive table based on the sampling SQL in Calcite; after the verification is passed, the sampling SQL is converted into a logical execution plan.

[0090] Optionally, the SQL-based data processing device of this embodiment further includes a registration module;

[0091] The registration module is used to obtain the initial custom rules written by the user based on actual needs; control the initial custom rules to inherit the RelOptRule class and implement onMatch; register the initial custom rules that implement onMatch into Calcite through the class that implements the RelNode interface to obtain the custom rules.

[0092] Optionally, in the SQL-based data processing device of this embodiment, the registration module is also used to obtain an initial physical converter; control the initial physical converter to inherit the ConverterImpl class and implement the EnumerableRel interface; register the initial physical converter that implements the numerableRel interface into Calcite through the class that implements the RelNode interface to obtain the physical converter.

[0093] Optionally, in the SQL-based data processing device of this embodiment, the physical converter includes a MapReduce physical converter, and the physical execution plan includes a MapReduce execution tree;

[0094] The physical execution module is specifically used to use Hadoop Yarn to schedule the physical execution plan and obtain a snapshot of the HBase entity table; based on the snapshot, use Hadoop Yarn to schedule the Mapper of the MapReduce execution tree to read the data in the HBase entity table; use Hadoop Yarn to schedule the Reducer in the MapReduce execution tree to process the data and write it into the Hive table.

[0095] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0096] Figure 3 This is an architecture diagram provided by an embodiment of a SQL-based data processing device of the present invention.

[0097] Optionally, the Calcite module 12 and the physical execution module 13 are composed of Figure 3 The extraction engine in .

[0098] Based on a general inventive concept, the present invention also provides a SQL-based data processing device for implementing the above method embodiment.

[0099] Figure 4 It is a structural diagram provided by an embodiment of a data processing device based on SQL of the present invention.

[0100] like Figure 4 As shown, the SQL-based data processing device of this embodiment includes a processor 21 and a memory 22, and the processor 21 is connected to the memory 22. The processor 21 is used to call and execute the program stored in the memory 22; the memory 22 is used to store the program, and the program is at least used to execute the SQL-based data processing method in the above embodiment.

[0101] It can be understood that the same or similar parts of the above embodiments can be referenced to each other, and the contents not described in detail in some embodiments can refer to the same or similar contents in other embodiments.

[0102] It should be noted that, in the description of the present invention, the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. In addition, in the description of the present invention, unless otherwise specified, the meaning of "plurality" refers to at least two.

[0103] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present invention includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by those skilled in the art to which the embodiments of the present invention belong.

[0104] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0105] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.

[0106] In addition, each functional unit in each embodiment of the present invention may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.

[0107] The storage medium mentioned above can be a read-only memory, a magnetic disk or an optical disk, etc.

[0108] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0109] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.

Claims

1. A data processing method based on SQL, characterized in that: include: Obtain the extraction SQL written by the user based on actual needs, and retrieve the pre-created Hive table and HBase virtual table from the metadata database; wherein the HBase virtual table is used to map the HBase physical table; In Calcite, combining the extraction SQL, the HBase virtual table, and the Hive table, generating a physical execution plan, and sending the physical execution plan to Hadoop Yarn, including: in Calcite, combining the extraction SQL, the HBase virtual table, and the Hive table, generating a logical execution plan; optimizing the logical execution plan based on fixed rules in Calcite and custom rules pre-registered in Calcite; calling a physical converter pre-registered in Calcite to convert the optimized logical execution plan into the physical execution plan; the physical converter includes a MapReduce physical converter, and the physical execution plan includes a MapReduce execution tree; The method uses the Hadoop Yarn to schedule the physical execution plan, reads the data in the HBase entity table and writes it into the Hive table, including: using the Hadoop Yarn to schedule the physical execution plan, obtaining a snapshot of the HBase entity table; based on the snapshot, using the Hadoop Yarn to schedule the Mapper of the MapReduce execution tree to read the data in the HBase entity table; using the Hadoop Yarn to schedule the Reducer in the MapReduce execution tree to process the data and write it into the Hive table.

2. The SQL-based data processing method according to claim 1, characterized in that: In the Calcite, the logical execution plan is generated by combining the extraction SQL, the HBase virtual table, and the Hive table, including: In the Calcite, based on the sampling SQL, basic information of the HBase virtual table and the Hive table is verified; After verification, the extraction SQL is converted into the logical execution plan.

3. The SQL-based data processing method according to claim 1, characterized in that: The method further comprises: Obtaining the initial custom rules written by the user based on actual needs; Control the initial custom rule to inherit the RelOptRule class and implement onMatch; The initial custom rule implementing onMatch is registered in the Calcite through the class implementing the RelNode interface to obtain the custom rule.

4. The SQL-based data processing method according to claim 3, characterized in that: The method further comprises: Get the initial physical converter; Control the initial physical converter to inherit the ConverterImpl class and implement the EnumerableRel interface; The initial physical converter that implements the numerableRel interface is registered in the Calcite through the class that implements the RelNode interface to obtain the physical converter.

5. A data processing device based on SQL, characterized in that: include: The acquisition module is used to obtain the extraction SQL written by the user based on actual needs, and to retrieve the pre-created Hive table and HBase virtual table from the metadata database; wherein the HBase virtual table is used to map the HBase physical table; The Calcite module is used to generate a physical execution plan in Calcite by combining the extraction SQL, the HBase virtual table, and the Hive table, and send the physical execution plan to Hadoop Yarn, including: generating a logical execution plan in Calcite by combining the extraction SQL, the HBase virtual table, and the Hive table; optimizing the logical execution plan based on fixed rules in Calcite and custom rules pre-registered in Calcite; calling a physical converter pre-registered in Calcite to convert the optimized logical execution plan into the physical execution plan; the physical converter includes a MapReduce physical converter, and the physical execution plan includes a MapReduce execution tree; The physical execution module is used to use the Hadoop Yarn to schedule the physical execution plan, read the data in the HBase entity table and write it into the Hive table, including: using the Hadoop Yarn to schedule the physical execution plan to obtain a snapshot of the HBase entity table; based on the snapshot, using the Hadoop Yarn to schedule the Mapper of the MapReduce execution tree to read the data in the HBase entity table; using the Hadoop Yarn to schedule the Reducer in the MapReduce execution tree to process the data and write it into the Hive table.

6. A data processing device based on SQL, characterized in that: The invention comprises a processor and a memory, wherein the processor is connected to the memory: Wherein, the processor is used to call and execute the program stored in the memory; The memory is used to store the program, and the program is at least used to execute the SQL-based data processing method according to any one of claims 1 to 4.