Tuesday, March 20, 2012

Retrieving list of files from XML in SSIS

I have an XML file which is having path for source files.
<files>
<file>c:\windows\1.xml</file>
<file>c:\windows\2.xml</file>
<file>c:\windows\3.xml</file>
</files>
1. I need to retrive these list in SSIS.
2. Find out if any of the file is modified within last 24 hours
time ... only if it exists.
3. send a mail to a given e-mail address.
I want to run it as a daily job and the list of file can change every
day in XML file.
~ShijuI'd probably "cheat" and create a script task to do the job.
"shiju" <shiju.samuel@.gmail.com> wrote in message
news:1171689178.353072.302370@.l53g2000cwa.googlegroups.com...
>I have an XML file which is having path for source files.
> <files>
> <file>c:\windows\1.xml</file>
> <file>c:\windows\2.xml</file>
> <file>c:\windows\3.xml</file>
> </files>
> 1. I need to retrive these list in SSIS.
> 2. Find out if any of the file is modified within last 24 hours
> time ... only if it exists.
> 3. send a mail to a given e-mail address.
> I want to run it as a daily job and the list of file can change every
> day in XML file.
> ~Shiju
>|||Hi
"shiju" wrote:
> I have an XML file which is having path for source files.
> <files>
> <file>c:\windows\1.xml</file>
> <file>c:\windows\2.xml</file>
> <file>c:\windows\3.xml</file>
> </files>
> 1. I need to retrive these list in SSIS.
> 2. Find out if any of the file is modified within last 24 hours
> time ... only if it exists.
> 3. send a mail to a given e-mail address.
> I want to run it as a daily job and the list of file can change every
> day in XML file.
> ~Shiju
>
I am not a SSIS expert but I think you should be able to use a foreach loop
for the XML file and specify the XPATH query to retieve the nodelist into a
variable which you can then use in a script task to check it exists.
John

No comments:

Post a Comment