Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How does output stream work?

Hi, I would like to have a job that uses the output from a tFileOutputDelimited as the input for a tFileInputDelimited
I'd like to do this without actually writing to a physical file
Is there a default command to use for the output stream to get the data from this component?
For example, my tFileInputDelimited component uses a tFileFetch as its source and the File name/Stream field looks like this:
((java.io.InputStream)globalMap.get("tFileFetch_1_INPUT_STREAM"))
Can I use something similar, e.g.
((java.io.InputStream)globalMap.get("tFileOutputDelimited_1_INPUT_STREAM"))
?
I tried doing just this but I get the error message: outputStream cannot be resolved to a variable
Thanks Smiley Happy
Labels (3)
11 Replies
willm1
Creator
Creator

What would your sample output look like (please write out 3 lines, so it's clear). Sounds like an iterate on the input flow , a tJava and some code to store in a hashmap could be used to skip file outputs. How many records do you anticipate having?
_AnonymousUser
Specialist III
Specialist III

I know its an old post, still replying just in case anyone is looking for similar kind of solution.
You could use tNormalize component. Here you can specify on which column you need to generate multiple rows, on which character you need the line break. Here for the given example data, it requires a tFileInputDelimitted --> tNormalize --> tExtractDelimitedFields --> tLogRow.
First the tFileInputDelimited component reads the file with default/normal linebreak and ","(comma) as the field delimiter. I presume that the first line is the header row which needs to be given as 1 in header row input box.
Second the tNormalize component act on the first column which is having delimited values including different line break that is ";" (semi colon)
Third the tExtractDelimitedFields component will take in the output of tNormalize and further splits the single column to multiple columns based on the field delimiter "|" (pipe).
Last the tLogRow will output the rows with modified schema as per the tExtracDelimitedFields component