Hi,
you might have better luck using the Python CSV module if your CSV data is a bit complex or contains special characters. I have posted a working example of how to do this here (
http://fmepedia.safe.com/CommunityAnswers?id=906a0000000ckLRAAY).
David
hi,
It skips the firstline because u have lines to skip 1 Header set to to yes.
One input file has a header the other not, so it seems logical not to use same settings on both.
When u make a custom transformer, the settings prompted override the ones in the navigator i think.
So even if you have "number of lines to skip" 0 (linked to skip-lines_csv) in the navigator, the screenshot in your csv_parameter_1.jpg shows its goin to skip a header (prompted).
Look at a part of a workbench i made. Look at the "promptscreen" and the settings in the Navigator. The ones in the prompt Override.
Gio
HI,
@Gio:
I thing the problem is in the option "File Has Field Names". This is always set to "yes". No matter what I have previously defined. This will also set "Number of Lines to Skip = 1", although I have said in the query at the start, "Number of Lines to Skip = 0".
You can see it in the logs:
a) "Number of Lines to Skip = 0", CSV without header
CSV Reader: Separator Character: ';'
CSV Reader: Skip Duplicate Delimiters: no
CSV Reader: Strip Quotes From Fields: yes
CSV Reader: File Has Field Names: yes
CSV Reader: Field Names Follow Header: no
CSV Reader: Number of Lines to Skip: 1
CSV Reader: Number of Footer Lines to Skip: 0
CSV Reader: Allowing Spaces in Column Names: yes
CSV Reader: Max features to scan for schema: 10000
CSV Reader: A column name of 'col2' was used to replace a blank column name
CSV Reader: Opening dataset 'C:\\Users\\ulbrichg\\Desktop\\Massengeokodierung_REST_FME\\Input\\Importbeispiel_100_Adressen_oue.csv'
b) "Number of Lines to Skip = 1", CSV with Header
CSV Reader: Separator Character: ';'
CSV Reader: Skip Duplicate Delimiters: no
CSV Reader: Strip Quotes From Fields: yes
CSV Reader: File Has Field Names: yes
CSV Reader: Field Names Follow Header: no
CSV Reader: Number of Lines to Skip: 1
CSV Reader: Number of Footer Lines to Skip: 0
CSV Reader: Allowing Spaces in Column Names: yes
CSV Reader: Max features to scan for schema: 10000
CSV Reader: Opening dataset 'C:\\Users\\ulbrichg\\Desktop\\Massengeokodierung_REST_FME\\Input\\Importbeispiel_100_Adressen.csv'
Please give can you give me the link to your Workbench?
Thanks!
@David:
That will probably be the solution for my problem. With your pattern it will work.
I'll let you know if it worked. Thanks!
Georg
Hi,
you might also want to try and upgrade to FME 2013 SP4 to see if this issue has been resolved there.
David
Hi David,
i have tested it already with:
Edition: FME Desktop ESRI Edition (floating)
Version: FME(R) 2014 (20140120 - Build 14235 - WIN32)
The problem is the same. But in 2014 i can't find this menu
https://www.dropbox.com/s/flu080r4kw41ov1/csv_parameter_1.jpg
Georg
David, can you please show me as a template a workbench in which you use your own CSV reader with the Python Creator?
I could solve my problem. I'm not sure what it was. However, I re-added to the CSV reader and set the option "Merge Feature Type".
Thanks for the replys!