Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello!
I have a job which is initiated by wehook and which loads xml source file into sql table when user uploads the xml file. The job looks like
now in one of the file I get this error while running this job.
how can i have them replaced? by using tReplace?
Regards
PV
In your job, before the processing with tFileInputXML you can cleanse the file by reading the XML with tFileInputFullRow -> tReplace-> tFileOutputDelimited (Cleansed File) [Cleansed Job] -> OnSubjobOk -> your main job of processing where the tFileInputXML will point to the cleansed file created in the cleansed job.
Thanks and Regards,
Subhadip
Hi Priya,
In short, if my understanding is right, you are having an issue due to unwanted character set in your input file.
What is the allowed character set in your input file. From your screen shot, I could see that its one of the European languages (apologies for my ignorance to recognize the language). So if you could share a problematic sample data and the expected output, we can try to do some experiments around it.
Warm Regards,
Nikhil Thampi
Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Hello @nthampi
In the screenshot you can see the character . But error I get is this:
Here is what I am getting in my file : ff form feed ctrl-l
| \x{C} | ff form feed ctrl-l | 014 | 12 | 0xC |  |
Hi,
In tReplace Advanced mode you can replace using regex pattern.
Please check the attachment.
Thanks and Regards,
Subhadip
@subhadip13 Thank you for your reply. Could you post a pic of whole job? I want to know where to place this treplace. Because my problem is the XML file is really very big.
Please read the file line by line as a full string using tFileInputFullRow -> tReplace -> tFileOutputDelimited for the cleansed file.
This flow will not use lot of memory as it will be line by line operation.
Thanks and regards,
Subhadip
Hello @subhadip13
Thank you again for your reply. But my issue is the file is uploaded via an application on a sharepoint location and this XML job is triggered via webhook. So when users uploads the file then it triggers this job. In this case how will this tFileOutputDelimited can be used? where will i store?
Regards
Priya
In your job, before the processing with tFileInputXML you can cleanse the file by reading the XML with tFileInputFullRow -> tReplace-> tFileOutputDelimited (Cleansed File) [Cleansed Job] -> OnSubjobOk -> your main job of processing where the tFileInputXML will point to the cleansed file created in the cleansed job.
Thanks and Regards,
Subhadip
yes. i got the flow, but in tFileOutputDelimited, dont i need to specify the path for the output file? but since I am loading the xml from sharepoint, i dont know where this tFileOutputDelimited output to store?
Regards
Priya