Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

Introduction

The OleDbConnection Data Provider allows you to import Core Identities all available entities over a OleDbConnection. Such a connection can be used to access various sources such as CSV files and others.

Connection Info

For all entity parts you need to specify the connection information which contains the following parameters.

Parameter

Mandatory

Example

Description

CustomConnectionString

Provider=Microsoft.ACE.OLEDB.12.0; Data Source="{filepath}";Extended Properties="Text;HDR=YES;FMT=Delimited"

The OleDB Connection String

ParametersReadMode

SingleLineWithHeaderAsKey

The appropriate read mode

SingleLineWithHeaderAsKey,
MultiLineKeyValue

GetForeignIdsCommand

select [unit] from [{csvFilename}]

A Ole DB conform query to select all foreign ids

GetParametersByForeignIdCommand

SELECT [unit] FROM [{csvFilename}] WHERE [unit] = '{{0}}'

A Ole DB conform query to select all needed properties of a given entitz

Sample configuration

<ConnectionParameters>
  <CustomConnectionString>Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Git\Moving\CustomerProjects\DEV\DEV.Import.Test\OleDbTestData;Extended Properties="Text;HDR=YES;Format=Delimited(;);characterset=65001"</CustomConnectionString>
</ConnectionParameters>
<GetParametersByForeignIdCommand>SELECT [description] FROM [orgUnits.csv] WHERE [id] = '{0}'</GetParametersByForeignIdCommand>
<ParametersReadMode>SingleLineWithHeaderAsKey</ParametersReadMode>
<GetForeignIdsCommand>SELECT [id] FROM [orgUnits.csv]</GetForeignIdsCommand>

Example files

Core Identities

email;id;first_name;last_name;manager_short_name;short_name;valid_from;language;meal
ww@ww.ww;ci1222;Wiww;Waww;wiwa;Wiwaww;01-01-2010;22;28
nn@mm.ll;ci7787;Tes;Ter;wiwa;Tetetete;01-01-2010;22;29

Employments

id;ciid;valid_from;valid_to;meal;address;e_number
e23232;ci1222;01-01-2010;01-01-2030;28;testAddress2;1001

Organization Units

id;name;parent_id;description
org1;Glorious Enterprise CSV-Maniac;;Small company that processes a lot of CSVs
org2;Ride-a-taxi-with-CSV;;Great taxi service with comma separated vehicles
org3;Pierogi u babuszki;;Babuszka i pierogi, złap życie za rogi!
org4;沒人知道;;
org5;Parent;;This is parent
org6;Child;org5;And this is child

Schema.ini

Note that you have to configure the schema.ini in the directory where the files are stored. A complete how-to can be found here:

https://itsense.atlassian.net/wiki/x/GgDyQ

/wiki/spaces/INTWIKI/pages/2271313979

  • No labels