Developer forum

Forum » Integration » Is it posible to get notification if dataintegration imports the same file, with same datestamp two days in a row?

Is it posible to get notification if dataintegration imports the same file, with same datestamp two days in a row?

Hans Ravnsfjall
Hans Ravnsfjall
Reply

Hi

we have a solution, where we get .csv file containg a list of products. We are supposed to get the file once a day, and we import the data once a day. However, the export from Navision has stopped on a couple of occasions, and this has caused confusion and frustration for the client.

 

Is there at way that we can set up notification, that notifies us if eg. the exact same file is being imported on two succesive times? Or is there some other way we can get notified if no new file har come from Navision? We have no control over the NAV part, so we can not set it up there. We have to somehow monitor it in Dynamicweb.

Can this be done somehow?

/Hans


Replies

 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply

Hi Hans,

maybe a simple solution could be to write a separate console application or a windows service that can use the .Net
FileSystemWatcher and subscribe to the change of the specified file/Folder and once it changes it can make an http request
to the scheduled task url that will run the data integration job inside it.

Or another way: you can use the Dynamicweb DataIntegration JobFinished event that is fired when the DI job is finished and once
this is hit then you can rename/remove/move the source csv file to the other location, so you know that this file will not longer be used
for the Data integration import.

BR, Dmitrij

 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

What about just deleting the file after import? https://doc.dynamicweb.com/documentation-9/integration/data-integration-module/integration-providers/csv-provider

 
Hans Ravnsfjall
Hans Ravnsfjall
Reply

Thanks for your help 👍🏻

yes, we are considering deleting the file after import, but for debugging reasons - we always need to be able to access the data that was imported last.

Is it posible to set up a scheduled task that copies the file to another folder, so that we always have a copy?

We are looking for a solution without having to do any custom coding, as we wan´t the solution to be as standard as posible.

/Hans

 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply

You can try to setup another Data Integration job that can make a "copy", for example make a job using CSV -> CSV provider job, or CSV -> Xml provider job with a
mappings from your source file. Then use a Url builder to make a scheduled task that will run this job and schedule this task accordingly. 

 

You must be logged in to post in the forum