...
Introduction
Der OleDB Dataprovider ermöglicht das Importieren ab unterschiedlichen Quellen wie beispielsweise Excel oder CSV Dateien, Datenbanken und weitere Systeme.
Ab CSV Dateien importieren
Dateistruktur
Die Dateien ab welchen importiert werden soll liegen idealerweise in einem Verzeichnis. Dies kann beispielsweise wie folgt aussehen:
Import
Personendaten.csv
Funktionsdaten.csv
Organisationsdaten.csv
Anstellungsdaten.csv
Configurationsdatei
Damit der OleDB DataProvider oder genauer gesagt, die OleDB Verbindung sauber aufgebaut werden kann, muss im Verzeichniss eine schema.ini
Datei vorhanden sein welche die Metadaten über die einzelnen Dateien enthält. Darin kann zum Beispiel der Delimeter konfiguriert werdenallows importing from different sources such as Excel or CSV files, databases and other systems.
Import from CSV files
File structure
The files from which you want to import are ideally located in one directory. This can look as follows, for example:
Import
Personal data.csv
Function data.csv
Organization data.csv
Employment data.csv
Configuration file
So that the OleDB DataProvider or more exactly the OleDB connection can be established cleanly, a schema.ini file must be present in the directory, which contains the metadata over the individual files. In it e.g. the delimeter can be configured.
Code Block |
---|
[Personendaten.csv] Format=Delimited(|) HDR=Yes [Funktionsdaten.csv] Format=Delimited(|) HDR=Yes [Organisationsdaten.csv] Format=Delimited(|) HDR=Yes [Anstellungsdaten.csv] Format=Delimited(|) HDR=Yes |
Connection String
Der Connection String wird anders als beispielsweise bei einer Excel Datei nicht auf die Datei, sondern auf den Ordner erstellt. Im entsprechenden Query wird dann die Datei anstelle des Tabellennamens angegeben. Hier ein Beispiel eines 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
:
Code Block |
---|
CustomConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\temp;Extended Properties=\"Text;\"" |
Der entsprechende Query Aufruf erfolgt dann wie folgt anhand eines Beispiels für eine The corresponding query call is then made as follows using an example for a OleDbCoreIdentityDataProviderConfiguration
:
...