[CSV] How to link Column Names in Schema and Header?
Hi!
I've got a question regarding tfileinputdelimited and their schemas, i made a simple job :
Both input read the same file, this one :
(A tab separated value file)
Here are the schemas of my two inputs :
http://i.imgur.com/nzQkzJ2.png http://i.imgur.com/hSNE6n0.png
And here's the output :
As you can see, in the second output, the values are wrong.
The components does not link the value and their header names (provided in the file) to the names specified in the schema, as a mysqlinput component would do, but instead read them in the order they come.
The output of my tLogRow_2 component should read "HO | HU" (second and third columns), not "Hi, HO". Is there a way to link header column names in file and columns names in schemas?
The CSV file is read by position. If you're expecting your input files to have columns out of order and you want to match up using header names, this component will not do this for you.
It's unclear what you're trying to do. Is your use case that you have to read CSV files that have columns in an unpredictable order? Ideally, this should not happen. If it is, then I think you'd have to do you're own parsing of the input data to assign the correct inputs to the correct outputs.