Exasol Parameters

Please refer to the Exasol User Manual to learn more about:

export_params

These parameters are given as a dictionary, like export_params = { "name1": "value1", "name2": ["value2", "value3"]}. This dictionary is passed into the Variants for a selected export_to_* method. When the code is executed, these are validated using the pyexasol.http_transport.ExportQuery.

Name

Example

Description

column_delimiter

Column delimiter for CSV (quoting)

column_separator

,

Column separator for CSV

columns

[“id”, “name”]

List of table columns, useful to reorder table columns during export from table

comment

This is a query description

Add a comment before the beginning of the query. See Comment.

csv_cols

[“1..5”, “6 FORMAT=’999.99’”, “8”]

List of CSV columns with optional numeric or date formats

delimit

AUTO

Delimiter mode: AUTO, ALWAYS, NEVER

encoding

UTF8

File encoding

format

gz

Export file or stream compressed with gz, bzip2, zip

null

N

Custom NULL value

row_separator

LF

Row separator for CSV (line-endings)

with_column_names

True

Add column names as the first line, which may be useful for external APIs (e.g. pandas)

import_params

These parameters are given as a dictionary, like import_params = { "name1": "value1", "name2": ["value2", "value3"]}. This dictionary is passed into the Variants for a selected import_from_* method. When the code is executed, these are validated using the pyexasol.http_transport.ImportQuery.

Name

Example

Description

column_delimiter

Column delimiter for CSV (quoting)

column_separator

,

Column separator for CSV

columns

[“id”, “name”]

List of table columns in the data source, useful if the column order of data source does not match the column order of Exasol table

comment

This is a query description

Add a comment before the beginning of the query. See Comment.

csv_cols

[“1..5”, “6 FORMAT=’999.99’”, “8”]

List of CSV columns with optional numeric or date formats

encoding

UTF8

File encoding

format

gz

Import file or stream compressed with gz, bzip2, zip

null

N

Custom NULL value

row_separator

LF

Row separator for CSV (line-endings)

skip

1

How many first rows to skip, useful for skipping header

trim

TRIM

Trim mode: TRIM, RTRIM, LTRIM

Comment

For any export_* or import_* call, you can add a comment that will be inserted before the beginning of the query.

This can be used for profiling and auditing. Example:

C.import_from_file('/test/my_file.csv', 'users', import_params={'comment': '''
This comment will be inserted before the query.
This query is importing user from CSV.
'''})

The comment is inserted as a block comment (/* <comment> */). The block comment closing sequence (*/) is forbidden in the comment.