Data transfer - Data source / Target "Text file"
Here you will find the instructions for configuring a data transfer if you selected "Text file" as the type of the data source or the type of the data destination in the first step when creating the connection. Here you will find the requirements for using text files in a data transfer.
Source / Target - Text file
A click on "Search" opens a dialog in which the source file or the target path of the export file can be selected. In both cases, the file must be stored in a directory released for the server.
Column separator
Select the character with which the columns in the text file should be separated.
Field separator
Select the character that denotes the beginning and end of the individual entries in the text file.
File contains headers
With this option, the first line is not imported but is used as the column title for the field assignment.
Encoding
You can select the encoding used in the text file.
Time zone
If the text file contains date values, the time zone can be modified here.
Click "Next".
Source / Target - Text file
The column names and data types from the source file are displayed here. The data types can also be changed here. Clicking on a cell in the "Data type" column displays a selection list for the data types.
Click "Next" to complete the configuration.
Requirements
Text files used as a source or target in the data transfer must have the following format:
-
The names of the data fields have to be in the first row, separated by semicolons
-
A semicolon at the end of the row is not allowed. The semicolon can be replaced with any other separator when it is defined in "schema.ini"
-
The data is in the subsequent lines. The order of the fields must correspond to that of the first row.
If you want to export Intrexx data as a text file, you first have to create a configuration file. In a text editor (Notepad, for example), create a text file named "schema.ini" in ANSI format. For each file in this directory, create a section that describes the properties of the text file as below:
[table.txt]
ColNameHeader=True
Format=Delimited(;)
MaxScanRows=25
CharacterSet=ANSI
Col1=Feld1 Char
Col2=Feld2 Integer
Col3=Feld3 Float
Row 1: Filename in square brackets (mandatory)
Row 2: Column headers present (True) or not (False) (mandatory)
Row 3: Separator (mandatory)
Row 4: Number of rows which will be read to determine the data type of the fields
Row 5: Charset
Rows 6 to 8: Names and data types of the individual columns. Permitted values are:
-
Bit
-
Byte
-
Char
-
Currency
-
Date
-
Float
-
Integer
-
Longchar
-
Short
-
Single
For date data types, use the formats:
-
dd-mmm-yy
-
mm-dd-yy
-
mmm-dd-yy
-
yyyy-mm-dd
-
yyyy-mm-dd
Here, mm represents the month as a number, mmm represents the month name. A field that only contains numbers with leading zeros - and should be imported with these zeros into Intrexx - must be defined as "Char". When importing from a text file (*.txt, *.csv) via the OLEDB interface into an Intrexx application, leading zeros in a field otherwise filled only with numbers will not be imported, if the assigned target field in the application has the “string” data type. This behavior of the OLEDB interface cannot be influenced by Intrexx. It automatically deals with fields filled only with numbers as integer fields, but there is also a configuration file named "schema.ini" in the same directory as the text file, which defines the data type.
Click here for more information.
Transformation - Field selection
If you have selected the "Text file" type as the target in the data transfer configuration, the "Transformation - Field selection" dialog appears. Click here for more information about this dialog.