I have a problem with the names of the columns. Indeed, I created a file delimited in the metadata section to be able to import via this schema data from a delimited files.
The problem is that my header contain number as names of columns, example of header: name_col_one;name_col_two;2010;2011.
Therefore, at the end of the creation of the metadata, when I choose the option 'Set heading row as column names', I have a '_', for example name_col_one;name_col_two;_010;'_011.
I really need to have a correct name of column because the next step is to unpivot my table and I don't want to have this kind of record name_col_one;name_col_two;_010;'value1_from_2010
but I want:
Thank you in advance
Solved! Go to Solution.
Thank you for your reply.
So, I cannot do anything?
I thought about something but I don't know if I can do it (I'm a beginner in Talend)
It is possible to add "manually" a header to use a Treplace component?
For example, after my unpivot, I have these records:
I add the "new" header to have this structure:
And after that, I use the Treplace component on the field "year" to replace all '_' by '2'.
The question is: How to add the new header?
Thank you very much in advance
I have several use cases where the output header format is not allowed by Java constraints. You can write out the header first, then append your results to the same file.
Thank you, it's works with the Tmap. I used the function StringHandling.CHANGE in my "new" header, which has been created in the Tmap as suggested.
Thank you again
Talend named a Leader.
Kickstart your first data integration and ETL projects.
Part 2 of a series on Context Variables
Learn how to do cool things with Context Variables
Find out how to migrate from one database to another using the Dynamic schema