read csv file

absak

Member
Hello,


I'm trying to read csv file,
S21.G00.06.001 ; S21.G00.11.001 ; S21.G00.30.001
843801515 ; 19 ; 1,52129E+12

i used the following code and try the following code:

View attachment 1547409678877.png


but the collection result is:

View attachment 1547409909785.png


i need to acceess to column values so i used:

'[DT_FichierSource.F1]&[DT_FichierSource.F2]'

but how to access to the second field
 

Attachments

  • 1547409833243.png
    241.2 KB · Views: 20

sivagelli

Well-Known Member
I am supposing your csv file is ';' delimited and not ',' delimited. This is the reason BP is reading values in to a single column as BP uses ',' as delimiter by default .
To make ';' as delimiter, create a 'Schema.ini' file with below lines and saved in source file directory of csv file.

Code:
[Your CSV file name.csv]
Format=Delimited(;)


If your csv file name is 'Source.csv' then the 'Schema.ini' should have the below lines-

Code:
[Source.csv]
Format=Delimited(;)

Once you have this Schema.ini file placed in the directory, your Process flow should work (with no changes) and collection will have values in to different columns.

Post back how it goes.
 

sivagelli

Well-Known Member
You can have multiple files listed in the Schema.ini file.

Code:
[Source1.csv]
Format=Delimited(;)
[Source2.csv]
Format=Delimited(;)
[Source3.csv]
Format=Delimited(;)
[Source4.csv]
Format=Delimited(;)
 
Top