Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Generic job with dynamic schema without header row

Hi,
I try to build a generic job which processes several hundreds of tables. It reads a flat txt-file with csv formatting into a dynamic schema with a tFileInputDelimited component and after processing writes another csv file. Between input and output the data is processed with a tJavaFlex component which iterates through all columns and processes the data according to the type an length provided in the schema file. The problem I have is, that the input file has no header row which names the columns of the file but the output file requires the correct header row. The corresponding schema of the table is provided in a separate xlsx interface specification file which looks more or less like the one attached. It is read by another subjob prior to the data file.
I managed to transpose the ColumnName into one row/String and add some ; but after several attempts I have no idea how to get this 'schema' row i front of the input data stream so that is recognized by the dynamic schema or to change the metadata column names in a java component after reading the file.
Simplest solution whould be to write a new temporary data file, insert the header row and appand the date from the original file, but this is definitely no practical solution because the input files can reach several GB in size and handeling this whole date just to add one row seems not very efficient to me.
0683p000009MAuk.png 0683p000009MAup.png
Labels (4)
11 Replies
Anonymous
Not applicable
Author

Hi,
much thanks for the suggestions. Actually it is helping me a lot to know, that I didn't missed some magic components or combinations which where fitting my needs.
I also thought about rewriting or recreating a custom component, but if you say that is not well documented and takes some time to get into how things work, I think I would rather stick to a more pragmatic solution.
Anyway, thank you very much for you help!
swatisood8
Contributor II
Contributor II

Hi Thomas, 

 

I saw your post and understood that you wanted to parse csv file without the header information. The corresponding schema is in a separate file. Well, I am trying to do something similar and i was wondering if you were able to get this working. If yes, can you share the knowledge?