Exporting data to user defined format. Data are exported to one file, which content is generated using dynamically calculated expression specified by the user. For each source record, the expression is calculated and the the result of the calculation is written to one target line. The expression should produce one-line string (i.e. result of its calculation should not contain line feed and carriage return characters).

Use this format if you want to define custom format for target rows or apply some rules which are not available in other formats. For example, the following expression produces semicolon separated rows, and in each row, it concatenates two fields into one and converts another field to lower case:

dataset_field_val(1, 'app_tittle') + ' ' + dataset_field_val(1, 'app_version') + ' ; ' + lower(dataset_field_val(1, 'app_url'))

The data can be exported to Custom format either from Database Tour (Pro) GUI or from the Database Tour Pro command line.

When exporting data from GUI, switch to Custom page of the Export dialog. If this page is not visible, click Favorite Export Formats button in the top-right corner of the window and make sure the corresponding format is selected.

Exporting Data to Custom Format

Format Specific Options

File - when exporting data from one table or SQL query, specify a file name to export data to. The option is not available when exporting data to clipboard.

Folder - when exporting data from a group of tables (multi-table export), specify a folder name to export data to. Each table will be exported to a separate file in the specified folder; file names can be specified in Table Mappings. The option is not available when exporting data to clipboard.

Expression - specify custom expression to construct the target data (see above).

Encoding - specify output encoding (e.g. ASCII, UTF-8 etc).

BOM - specify either to include BOM (byte order mark) when using Unicode encoding.

Line break - specify line break style; if you choose Windows, then each line in the file will be terminated by carriage return and new line character (CR+LF); if you choose Mac, a carriage return (CR) will be used to separate lines; otherwise, Unix style will be used (LF).

Export mode

Specify export mode:

REPLACE+INSERT

Target is created and filled with incoming rows; if target already exists, it is overwritten.

CREATE_OR_REPLACE

Blank target (using appropriate structure) is created; if target already exists, it is overwritten.

APPEND

Target is appended with incoming rows; if target does not exist, it is created.

Notes
The format and field structure must be compatible with existing target.

Note: For multi-table exporting, the value can be overridden for each individual table in Table mappings section.

Record range

Specify range of source records to be exported:

Full table - all records are exported.
Selected records only - only selected records are exported. To select rows, click the corresponding button and then select needed rows using Shift, Ctrl and arrow keys.
From current record to the last one - all data between current and the last records are exported.

Limit the record count to - specify a maximum number of records to be exported. If this option is not specified or it is less then 1, all records from the specified record range will be exported. If you want just create a file (table) without data exporting, use the corresponding Export mode instead.

Column range

Specify range of source columns to be exported:

All columns - all columns (including columns, which were temporary hidden by user) are exported.
Selected column only - only selected (current) column is exported.
Visible columns - only visible columns are exported.

Other options

Ask before overwrite or empty existing target - specify either to ask the user to overwrite existing target for REPLACE+INSERT and CREATE_OR_REPLACE export modes. The option is not available when exporting data to clipboard.

See also

Command Line Usage

Table and Field Mappings