Hi,
I want to add a row ( header ) to my file. it has to be in the beginning, but i'm finding it hard to do. I have more than 200 columns and some columns are integer, Date or string type. Can anyone show me how to do it ? Thanks !
tFileOutputDelimited has the option to 'Include Header'. There are some edge cases where this does not work well. In these instances, you can write your file twice - once for the header and once for your data, remembering to 'Append' when you write your data.
For example: -
tFixedFlowInput->tFileOutputDelimited (no header, no append) to write your header
tMySQLInput->tFileOutputDelimited(no header, append) to write your data
I would recommend 'Include Header'. If this is not working for you, what is the issue?
Thank you Tal for your quick response.
Actually, i've done some jobs on my file. During this process, i removed the header from the file because of some errors i had. Now that my jobs are done. I want to add the header again. My files are stored in cloudera. i tried creating a file were i have only my header and add the data stored in the other files into it. But it doesn't work.
Any updates on this topic?
I have a similar problem. I want to split big files to smaller ones and add a row on the very beginning of the smaller file(s).