Developer forum

Forum » Integration » Removing unwanted rows in batch jobs

Removing unwanted rows in batch jobs

Asim Shahzad
Reply

Hi,

We want to remove unwanted files from a source XML file.  Right now, we are using XML provider as source and User provide as destination.  Is there any way we can loop through the XML file and remove unwanted rows on a certain criteria ?

I will really apperciate, if anybody has any idea how we can achieve it.

 

//Asim


Replies

 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply

Hi Asim,
As I understand you need to remove unwanted lines from the source XML file?
If yes, you can use the XSLT to transform the input xml to your needs, and then in the source XML provider you can select the XSLT file in the "XSL file" option so it will be applied on your source file.
Regards, Dmitrij
 

 
Asim Shahzad
Reply

Hi Dmitriy,

Thanks for your reply, i have not worked with XSLT before but can i work wtih server side code in XSL file ? The reason why i am asking that is because we are receiving users in the XML file and before the user is updated or inserted in the DW DB by the XML provider. I want to compare some values of the user i received in the XML file with the user available in the DW DB(If that user is available in the DB). After that i need to remove or keep the user from the XML file. Can i user "TableScript" or anything else ?

Regards

Asim

 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply
This post has been marked as an answer

Hi Asim,
yes, you can use a table script for that. Also you will need some condition on the table mapping so it should skip the users you do not want to be imported.
So in the table script you can set the value for some boolean custom field for the user you want to skip: row["SomeSkipUserCustomField"] = 1
and having a condition in the job: SomeSkipUserCustomField <> 1.
Regards, Dmitrij

Votes for this answer: 1

 

You must be logged in to post in the forum