Quantcast
Channel: SQLServerCentral » SQL Server 2014 » Development - SQL Server 2014 » Latest topics
Viewing all articles
Browse latest Browse all 3145

SSIS Package Foreach Loop Container not finding files when deployed (fine in DEV)

$
0
0
Hi there,I have a SSIS 2014 package using the Project Deployment model and parameters. I have a project parameter called FlatFilePath which is the path to a folder where a bunch of text files are. I want to iterate this folder and load the files into SQL Server. The Foreach Loop container with File Enumerator does not allow you to set the Variable in the Variable Mappings tab to a Project Parameter, only package variables. So I am using a user package variable called [b]User::FullFilePath[/b] to store the output of the Foreach Loop container. This means I cannot use a Project Connection Manager for the flat file source because that only allows project parameters in the Expressions property for the connection string. I am therefore using a package flat file connection manager.This is fine when running the package in SSDT, however when I deploy it to my server and run it, the output of the Foreach Loop container is Empty and therefore cannot find any files. I see this message in the log:[code="plain"]The For Each File enumerator is empty. The For Each File enumerator did not find any files that matched the file pattern, or the specified directory was empty.[/code]Has anyone else experienced this and discovered a workaround?

Viewing all articles
Browse latest Browse all 3145

Trending Articles