...
Code Block |
---|
[Personendaten.csv]
Format=Delimited(|)
HDR=Yes
MaxScanRows=0
[Funktionsdaten.csv]
Format=Delimited(|)
HDR=Yes
MaxScanRows=0
[Organisationsdaten.csv]
Format=Delimited(|)
HDR=Yes
MaxScanRows=0
[Anstellungsdaten.csv]
Format=Delimited(|)
HDR=Yes
MaxScanRows=0
Col1=Anstellungs_Id Integer
Col2=Start_Anstellung DateTime(yyyy.mm.dd)
Col3=Ende_Anstellung DateTime(yyyy.mm.dd)
Col4=Funktion Text |
Format=Delimited(|)
Defines the delimiter of the CSV file. Here it’s defined as the pipe |
...
Defines how many rows are considered for defining the type of a column. 0 means it considers all the rows which is recommended, because it increases the precision of defining the data type.
Col3=Ende_Anstellung DateTime(yyyy.mm.dd)
Especially for columns with a date, it may happen that the automatic detection does not work and the date is always interpreted as text instead of as DateTime.
To get around this, you can specify what data type it is for each column.
Col3=Ende_Anstellung DateTime(yyyy.mm.dd)
means that column 3 should be read out as DateTime and is present in the original file in the format yyyy.mm.dd.
Important: You cannot specify a single column. If specification of the DataType for a column is needed, all columns must be defined.
Connection String
Unlike an Excel file, for example, the connection string is not created on the file but on the folder. In the corresponding query, the file is then specified instead of the table name. Here is an example of a OleDbConnectionParameters
:
...