Purpose
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. When the data volume is large, this may lead to data import failures. Therefore, for large data scenarios, it is recommended to submit data import tasks asynchronously.
Syntax
SUBMIT JOB sql_statement ;
Limitations and considerations
The sql_statement parameter specifies the SQL statement used by the job. Currently, only simple SQL 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 digits
20100represent the database ID. - The following digits
11125899910644432are the globally unique sequence ID.
