Importing Current Files Only

  • Well, that's wonderful piece of information on your blog. Thanks for sharing !!

    I tried using dummy flow task and then came the expression part. I tried to evaluate the expression to true when the variable equals current file(todays' date stamp).

    Executed the container and everything turned GREEN !

    But, there's no data loaded into the SQL table. huh !

    Maybe, I should settle down by using a process task to archive the loaded files everday and that way I don't have to worry about looking for datestamp,

    Here's what I did.

    Variable : uvFilename, value : File_TX_

    Expression for CSV Source Connection String:

    @[User::uvFolderPath] + "\\"+ @[User::uvFilename]+ RIGHT("0" + (DT_WSTR,2)MONTH(GETDATE()), 2)

    + RIGHT("0" + (DT_WSTR,2)(DAY( GETDATE())), 2) + RIGHT ( "0" + (DT_WSTR,4)YEAR(GETDATE()),2)

    + ".csv"

    Expression on Precedence for Dummy Flow Task:

    @[User::uvFilename] == "File_TX_"+ RIGHT("0" + (DT_WSTR,2)MONTH(GETDATE()), 2)

    + RIGHT("0" + (DT_WSTR,2)(DAY( GETDATE())), 2) + RIGHT ( "0" + (DT_WSTR,4)YEAR(GETDATE()),2)

    + ".csv"

    Mapped uvFilename as variable in For Each Loop Container.

    My Objective: Everyday files get downloaded from FTP. Files are from 40 different states with different names with datestamp included. I am hoping to use For Each Loop Container to grab only files with todays' date within their names and not the files form previous days.

    Thanks again for spending time on my problem.

    ________________________________________________________________
    "The greatest ignorance is being proud of your learning"

Viewing post 16 (of 15 total)

You must be logged in to reply to this topic. Login to reply