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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

replace string on whole input line

Hi,
I'd like to replace strings on the whole input line in one step. Is this possible?
My file has >100 columns so I guess it was a performance drawback to replace them column by column.
Thanks
Guenter
Labels (2)
6 Replies
Anonymous
Not applicable
Author

Hello
Can you give us an example to expain your problem?
Does the tFileInputFullRow fit your need? It read the whole line as a column.
Best regards

shong
Anonymous
Not applicable
Author

Example:
Input row structure:
Text1;Float1;Text2;Text3;.Float2;Float3;Int1;Time1;...;Text130;...Textn
The input consists of hundreds of columns. Since the text fields can contain unwanted characters like | & @ \n I need to replace them by other characters.
After replacement I have to process the rows column by column.
So my request is to do the replacement on the complete input row in one step regardless of the structure.
tFileInputFullRow provides the whole row as one string but:
1. input rows may contain \n (enclosed by " according to rfc4180)
2. how can I map the complete row(=1 string) to the columns needed for further processing?
Other ideas:
1) Is it possible to read the file line by line, do the replacement, write the lines to an in-memory-file and open the in-memory-file with the tFileInputDelimited component?
2)
- use sed in a tSystem-component for replacement
- read the sed-output via a pipe
Is this possible?
Thanks
Guenter
_AnonymousUser
Specialist III
Specialist III

I have exactly this problem (as per the most recent message which doesn't look like it was ever answered) - any idea what the best solution is?
Thanks very much
Anonymous
Not applicable
Author

Same problem here. Any hints?
janhess
Creator II
Creator II

Read each row as a single data item and do the replace on that.
alevy
Specialist
Specialist

tFileInputFullRow --> tReplace --> tExtractDelimitedFields -->
or
tFileInputDelimited --> tJavaRow --> using reflection to cycle through the fields and do your replace (see https://community.talend.com/t5/Design-and-Development/resolved-Automatically-trim-non-String-fields...)