Purpose
You can use this statement to create an asynchronous job. When you use the INSERT INTO or INSERT OVERWRITE SELECT statement to import data, the data import process is executed synchronously by default, which may fail if a large amount of data is to be imported. Therefore, in scenarios where large amounts of data are to be imported, we recommend that you submit an asynchronous import job.
Syntax
SUBMIT JOB sql_statement ;
Parameters
sql_statement specifies the SQL statement executed by the job. At present, only simple SQL statements are supported, such as CREATE TABLE AS SELECT, INSERT INTO SELECT, INSERT OVERWRITE, LOAD DATA INFILE, and SELECT INSERT.
Examples
obclient> SUBMIT JOB INSERT OVERWRITE test SELECT * FROM test_external_table;
+------------------------+
| job_id |
+------------------------+
| 2010011125899910644432 |
+------------------------+
1 row in set (0.010 sec)
Take note of the following items:
- The first five digits
20100represent the database ID. - The last several digits
11125899910644432represent the global unique ID.