SUBMIT JOB
Description
This statement is used to create an asynchronous task.
When using INSERT INTO or INSERT OVERWRITE SELECT to import data, the default execution mode is synchronous. If the data volume is large, this may lead to data import failures. Therefore, in scenarios with large data volumes, it is recommended to submit data import tasks asynchronously.
Syntax
SUBMIT JOB sql_statement ;
Limitations
sql_statement specifies the SQL statement used by the job. Currently, only simple statements such as CREATE TABLE AS SELECT, INSERT INTO SELECT, INSERT OVERWRITE, and LOAD DATA INFILE are supported.
Examples
SUBMIT JOB INSERT OVERWRITE test SELECT * FROM test_external_table;
+------------------------+
| job_id |
+------------------------+
| 2010011125899910644432 |
+------------------------+
1 row in set (0.019 sec)
where:
- The first five digits
20100represent the database ID. - The following digits
11125899910644432are the globally unique sequence ID.