Export Data to External Table
As a way of data export, Palo supports writing data directly to ODBC external tables through INSERT
command.
Create an ODBC external table through CREATE ODBC TABLE first.
Then write the data to the external table through the following commands:
INSERT INTO extern_tbl VALUES(1, 2, 3);
INSERT INTO extern_tbl SELECT * FROM other_tbl;
It is not recommended to submit a large number of data writings at one time for the writing operation is made in a single ODBC Client connection mode.
Also, Palo supports write transaction for ODBC external tables. Execute INSERT
command by setting the session variable enable_odbc_transcation
to start transaction support:
SET enable_odbc_transcation = true;
INSERT INTO extern_tbl SELECT * FROM other_table;
Transaction support can ensure the atomicity of data writing to avoid partial data writing.
Please start write transaction as appropriate for it will reduce write efficiency.
Refer to INSERT for more information about INSERT command.