is it possible to add a header to an tFileOutputDelimited from a tMap, so that it appears at the top of the file only once and the rest of the rows are just appended on?
In which version are you? In 2.3 and 2.4, the Basic settings of the tFileOutputDelimited have an option : "Include header", check this and you will have an header in the file..... Was it your question? I hope it's help you. P.S : You will find screenshot of this component in the manual.
I have seen this checkbox alright. I am using version 2.4, where can I set this header value that appaers to be the problem i dont see anywhere where i can set this header value to be some string entered by myself....?!
hi olivier, thanks for the help. I know where it is, I want to include a header in teh file, but i want to be able set the value of this header somewhere in talend, is that possible?!?!
by default, it's the name of columns... Change the names by editing the schema or by changing them in the tMap (at the right of the tMap), it will propagate the news names to the tFile and you will have the header you want. Is that your question?
Yes i want to be able set that value somewhere but i dont want it to be the column name, and i want it to be a sting of about 255 characters, so I dont think this will suffice..... is there any other way of doing it?
the string that i want to change it to will have the newline character etc in it along with spaces, surely there is a simple way to set the header of the file to a string of some value?!
Can you post a screenshot of the part of your job.
If I understood what you want :
You want to add a column after your tMap in the file that results of the tMap? So your file have a column more than the the fields in the tMap????
You can define the schema of the file "globally" in the metada part (at the left of TOS, in the repository window), then you select "repository" instead of "built-in" for the schema of the file in the tFileOutputDelimited component basic settings tab.....
In the metadata, you define the file you want to have with the column (type = string).... and in the tMap, you can file-in this column with the value you want (like a constant = "your_text"????)....
Indigo, You basically just want to append a line at the top of your output file, but above the header... Kinda like:
***** This is output was created 7/3/2008 @ 13:45 EST ***** Department || DeptID EH&S || 1000 ENGINEERING || 1001 MAINTENANCE || 1002 Manufacturing || 1003
Maybe you can use RowGenerator to just create a single line, write out to that file first, then write your data out to the same file as an append? - Brian