Purpose
This statement is used to create an asynchronous task. When using INSERT INTO or INSERT OVERWRITE SELECT to import data, the process is executed synchronously by default. For large volumes of data, this can lead to import failures. Therefore, for scenarios involving 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
obclient> SUBMIT JOB INSERT OVERWRITE test SELECT * FROM test_external_table;
+------------------------+
| job_id |
+------------------------+
| 2010011125899910644432 |
+------------------------+
1 row in set (0.010 sec)
Where:
- The first five characters
20100represent the database ID. - The last few digits
11125899910644432are a globally unique sequence ID.