Home Forums SQL Server 2005 Business Intelligence Import Dynamic File Name with a Date/Time as the file type (YYYYMMDDHRMMSS) RE: Import Dynamic File Name with a Date/Time as the file type (YYYYMMDDHRMMSS)

  • opc.three (6/12/2013)


    sneumersky (6/12/2013)


    Can SQL_Enthusiast's issue be solved with a WMI task or data reader? I have not used it in ages, nor am I a WQL expert 🙁

    A WMI Data Reader, maybe, since you can issue an "select" from the file system and the WQL supports the order by. I'll try it out and post back. Would that qualify as "native" SSIS for you Jeff since there is a "WMI Data Reader Task" built into SSIS?

    Upon further review, WQL does not support ORDER BY (or TOP) so I struck out there and could not find an alternate way to "select the newest file in a directory". It might be possible, just saying I could not get it going after some searching online for WQL examples.

    You could definitely do this with a WMI Watcher Task having the SSIS process any files that arrived as soon as they arrived, but that might be a little bit much for this particular problem case. If anyone is interested here is an article I wrote that shows how to do that: Using the WMI Event Watcher Task in SSIS to Process Data Files[/url]. I would probably stick with the Script Task solution I proposed earlier over the WMI Watcher solution in the article for this simple of a problem case.

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato