• BeatleBoy - Thursday, January 25, 2018 2:42 PM

    Hello,

    I have a SSIS component that does SFTP tasks. One such task is to fetch a list of remote files. The tasks allows me to use a FLEE expression string as a file filter in the fetch. When I developed the package in Visual Studio I have a string variable Config_RemoteFileFilter with the value Modifiedtime > Now.AddDays(-1) and Name.EndsWith(".txt"). Running the package there works flawlessly and I get all files updated in the last day that have a .txt extension. However, now I'm testing deploying this package to SQL Server Agent and when I put that value into the job "Set Values" configuration tab and run the DTEXEC command line that it generates in the "Command Line" tab, the job it doesn't fetch any of the files.

    To debug, I put a script step into the package that outputs all of my variable values and found that when I run the package via DTEXEC, the runtime value of the variable Config_RemoteFileFilter is Modifiedtime "and" Name.EndsWith(".txt"). My hunch is that the FLEE expression is being treated as an SSIS variable expression and evaluating to this - but I am very new to SSIS so that is just a hunch. I figured the experts here would be able to take one look at it and help me figure out how to enter an escaped value into the job so that my variable is set as I expect.

    Thanks in advance everyone for taking the time to read and potentially help.
    Sean

    Please if you could post the error message fully. Also kindly explain why you've not gone with For each loop container ?  Just a suggestion.