Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How can I use the word "public" in a schema and printed as a header in an output file?

Hi! 

 

One of the columns in my schema is called "public" but Talend doesn't allow me to use it due to it being a reserved word. What's the best way to make it printed as a header in a file if I can't use it in the schema? 

 

Thanks in advance! 

Labels (4)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

This is a bit of a pain but is due to Java reserved words. Take a look here https://www.computerhope.com/jargon/j/java_reserved_words.htm

 

One way to get around this is to pre-emptively write the header of your file using a tFixedFlowInput component connected to your file in a SubJob. Use it to write the first row as data. Once this is done, in a SubJob following this, write your data to the file with a different file component and set the append option to true. So the first write will add the header, the second will add your data. 

 

Granted, this is not ideal. But it is a niche issue caused by the fact that Java is used to build the jobs.

View solution in original post

1 Reply
Anonymous
Not applicable
Author

This is a bit of a pain but is due to Java reserved words. Take a look here https://www.computerhope.com/jargon/j/java_reserved_words.htm

 

One way to get around this is to pre-emptively write the header of your file using a tFixedFlowInput component connected to your file in a SubJob. Use it to write the first row as data. Once this is done, in a SubJob following this, write your data to the file with a different file component and set the append option to true. So the first write will add the header, the second will add your data. 

 

Granted, this is not ideal. But it is a niche issue caused by the fact that Java is used to build the jobs.