I have been trying to load csv files from lua script. But I am getting the error below.
When I run the import statement alone, its working fine. Here is my code.
CREATE OR REPLACE LUA SCRIPT TEST_LOAD () RETURNS TABLE AS query([[ IMPORT INTO TEST_TABLE FROM LOCAL CSV FILE 'F:\test_file.csv' ENCODING = 'UTF-8' ROW SEPARATOR = 'CRLF' COLUMN SEPARATOR = ',' SKIP = 1 ]]); EXECUTE SCRIPT TEST_LOAD ();
Kindly share your ideas
What you can do is to save the SQL into a file and run that from the Exasol_CLI, that's what I'm using for creation of exports.
Please see: https://docs.exasol.com/connect_exasol/sql_clients/exaplus_cli/exaplus_cli.htm
as the error message suggest this can only be done from within a jdbc based application because a client part is used to do the actual IO with the local file and LUA can't access this component (LUA is running in the engine).
What you could do is put that file on an FTP(s) server. In that case you would be able to import the file in LUA.