JDBC: IMPORT/EXPORT LOCAL CSV/FBV: include file names of local files into auditing data

Details

Detail name Value
Changelog Number 14248
Type Improvement
Status Resolved
Fix Versions Exasol 8.0.0, Exasol 7.1.7
Resolution Date 2022-03-16

Background

LOCAL CSV/FBV IMPORT/EXPORT is only supported in JDBC. In case the driver recognizes an IMPORT/EXPORT job with a local file, it will open a special connection to the database and adjust the query before sending the statement to the database.
Internally this query is treated as a normal IMPORT/EXPORT statement from an HTTPS server causing the original file name to not be included in the auditing data.

Example
Original query:

import into t1 from local csv file 'test.csv'
import into t2 from local csv file '/path/to/my/file/test2.csv' file '/path/to/another/file/test3.csv'

SQL_TEXT from EXA_DBA_AUDIT_SQL:

import into t1 from CSV AT 'https://10.0.0.1:44921' FILE 'f2d96d06-ef20-41e4-b493-1090fb340d6b'
import into t2 from CSV AT 'https://10.0.0.1:37085' FILE 'd270b87a-0510-4c5c-ad7f-db9558aed679' MULTIPLE LOCAL FILES

Improvement

For every IMPORT FROM LOCAL CSV/FBV and EXPORT INTO LOCAL CSV/FBV statement a comment is added that includes all the files that were specified by the user.

Example
Original query:

import into t1 from local csv file 'test.csv'
import into t2 from local csv file '/path/to/my/file/test2.csv' file '/path/to/another/file/test3.csv'

SQL_TEXT from EXA_DBA_AUDIT_SQL:

import into t1 from CSV AT 'https://10.0.0.1:44921' FILE 'f2d96d06-ef20-41e4-b493-1090fb340d6b' /*file 'test.csv'*/
import into t2 from CSV AT 'https://10.0.0.1:37085' FILE 'd270b87a-0510-4c5c-ad7f-db9558aed679' /*file '/path/to/my/file/test2.csv' file '/path/to/another/file/test3.csv'*/ MULTIPLE LOCAL FILES