Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
AJ151
Contributor
Contributor

Replacing data in file series

Hi All,

I am doing a String replacement in a series of multi schema file.

For example ( having x input files - daily process):

InputFile 1: 00; col 1; ; col 3;col 4%

01; col 1; col 2;col 3%

02; ; col 2; ; col 4;col 5%

01; col 1; ; .col3% so on

InputFile 2:

00; ;col 2; col 3;col 4%

01; col 1; ; col3%

02; ; col 2; col 3 ; ; col 5%

01; ; col 2%; .. so on

& a table for the string replacement combination (for a particular schema)

Header OldString NewString

02 abcd def

02 efd hij

All I want to do is replace the above files as per the table.. (Should not merge files)

Iam using the below concept:

->tfileinputdelimited -> tmap -> tfileoutputdelimited

-> table

My concerns are:

1) This works fine in replacing data for one particular file, but when comes to multiple files the initial data gets erased.

2) The file structure gets changed.

Tried using tfileinputdelimited -> tjavarow removing all the trailing blanks -> This worked but badly struck with placing the replaced data back to the inputfile

Could you please suggest me with the flow for the replacing multiple files without changing the structure? And yeah I am new to Talend.

Labels (2)
2 Replies
manodwhb
Champion II
Champion II

AJ151
Contributor
Contributor
Author

Thanks for the response @Manohar B​ . But I am not using any db here. All the process are just been dealt with files.