February 5, 2018 at 2:08 pm
I have a package where network file paths are set up as package parameters, and these parameters are referenced in package variables that concatenate with file names read from file enumeration loops. Something like @[$Package::parWorkingFIlePath] + @[User::usrXMLFileNamePath]
Everything works fine in VS. My deployment plan was to use environment variables to read in the testing/production file paths from environment variables to the parameters on the server. On the server all of the variables that reference the package parameters populated from the environment variables fail validation, with a message that the 'expression cannot be parsed'.
I saw a mention somewhere that environment variables cannot be referenced by package variables. Is this the case? If so what would be the best method to pass the folder paths to the package variables?
Thanks
Tim
February 5, 2018 at 2:43 pm
slimchance99 - Monday, February 5, 2018 2:08 PMI have a package where network file paths are set up as package parameters, and these parameters are referenced in package variables that concatenate with file names read from file enumeration loops. Something like @[$Package::parWorkingFIlePath] + @[User::usrXMLFileNamePath]Everything works fine in VS. My deployment plan was to use environment variables to read in the testing/production file paths from environment variables to the parameters on the server. On the server all of the variables that reference the package parameters populated from the environment variables fail validation, with a message that the 'expression cannot be parsed'.
I saw a mention somewhere that environment variables cannot be referenced by package variables. Is this the case? If so what would be the best method to pass the folder paths to the package variables?
Thanks
Environment variables pass values to parameters, which are then read-only throughout package execution.
Package variables can reference the values of parameters (as passed in from an environment variable), no problem.
Does that help at all?
The absence of evidence is not evidence of absence
- Martin Rees
The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
- Phil Parkin
February 6, 2018 at 6:44 am
slimchance99 - Monday, February 5, 2018 2:08 PMI have a package where network file paths are set up as package parameters, and these parameters are referenced in package variables that concatenate with file names read from file enumeration loops. Something like @[$Package::parWorkingFIlePath] + @[User::usrXMLFileNamePath]Everything works fine in VS. My deployment plan was to use environment variables to read in the testing/production file paths from environment variables to the parameters on the server. On the server all of the variables that reference the package parameters populated from the environment variables fail validation, with a message that the 'expression cannot be parsed'.
I saw a mention somewhere that environment variables cannot be referenced by package variables. Is this the case? If so what would be the best method to pass the folder paths to the package variables?
Thanks
If you are using SQL Server 2012 onward I would suggest you research Project Deployment where you can set parameters in the SSIS Catalog for each server the project is deployed to. If you know how to set up configurations in Visual Studio your configuration values and paths etc can be configured in Visual Studio and deployed along with your project. To ease development and deployment make sure you use the security setting Don't Save Sensitive on all of the packages and the project. You then need to set sensitive values in the SSIS catalog post deployment. That way you don't need to mess around with Environment Variables and Configuration Files.
February 6, 2018 at 7:02 am
tim.ffitch 25252 - Tuesday, February 6, 2018 6:44 AMslimchance99 - Monday, February 5, 2018 2:08 PMI have a package where network file paths are set up as package parameters, and these parameters are referenced in package variables that concatenate with file names read from file enumeration loops. Something like @[$Package::parWorkingFIlePath] + @[User::usrXMLFileNamePath]Everything works fine in VS. My deployment plan was to use environment variables to read in the testing/production file paths from environment variables to the parameters on the server. On the server all of the variables that reference the package parameters populated from the environment variables fail validation, with a message that the 'expression cannot be parsed'.
I saw a mention somewhere that environment variables cannot be referenced by package variables. Is this the case? If so what would be the best method to pass the folder paths to the package variables?
Thanks
If you are using SQL Server 2012 onward I would suggest you research Project Deployment where you can set parameters in the SSIS Catalog for each server the project is deployed to. If you know how to set up configurations in Visual Studio your configuration values and paths etc can be configured in Visual Studio and deployed along with your project. To ease development and deployment make sure you use the security setting Don't Save Sensitive on all of the packages and the project. You then need to set sensitive values in the SSIS catalog post deployment. That way you don't need to mess around with Environment Variables and Configuration Files.
Aha, my post was referring to Environment Variables in SSISDB, not to DOS variables.
The absence of evidence is not evidence of absence
- Martin Rees
The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
- Phil Parkin
February 6, 2018 at 7:06 am
Phil Parkin - Monday, February 5, 2018 2:43 PMslimchance99 - Monday, February 5, 2018 2:08 PMI have a package where network file paths are set up as package parameters, and these parameters are referenced in package variables that concatenate with file names read from file enumeration loops. Something like @[$Package::parWorkingFIlePath] + @[User::usrXMLFileNamePath]Everything works fine in VS. My deployment plan was to use environment variables to read in the testing/production file paths from environment variables to the parameters on the server. On the server all of the variables that reference the package parameters populated from the environment variables fail validation, with a message that the 'expression cannot be parsed'.
I saw a mention somewhere that environment variables cannot be referenced by package variables. Is this the case? If so what would be the best method to pass the folder paths to the package variables?
Thanks
Environment variables pass values to parameters, which are then read-only throughout package execution.
Package variables can reference the values of parameters (as passed in from an environment variable), no problem.
Does that help at all?
That is my understanding, and that is how the packages are built. but for some reason all of my package variables that reference the parameters show validation errors on the server (no problem in VS)
thanks
Tim
February 6, 2018 at 7:13 am
slimchance99 - Tuesday, February 6, 2018 7:06 AMPhil Parkin - Monday, February 5, 2018 2:43 PMslimchance99 - Monday, February 5, 2018 2:08 PMI have a package where network file paths are set up as package parameters, and these parameters are referenced in package variables that concatenate with file names read from file enumeration loops. Something like @[$Package::parWorkingFIlePath] + @[User::usrXMLFileNamePath]Everything works fine in VS. My deployment plan was to use environment variables to read in the testing/production file paths from environment variables to the parameters on the server. On the server all of the variables that reference the package parameters populated from the environment variables fail validation, with a message that the 'expression cannot be parsed'.
I saw a mention somewhere that environment variables cannot be referenced by package variables. Is this the case? If so what would be the best method to pass the folder paths to the package variables?
Thanks
Environment variables pass values to parameters, which are then read-only throughout package execution.
Package variables can reference the values of parameters (as passed in from an environment variable), no problem.
Does that help at all?That is my understanding, and that is how the packages are built. but for some reason all of my package variables that reference the parameters show validation errors on the server (no problem in VS)
thanks
SSDT does not use SSISDB environment variables, if you are referring to 'Debug' mode.
Did you double check that
a) The correct environment has been mapped to the correct project (using 'Configure'), and
b) That the variable mappings have been made correctly (also using 'Configure'), and
c) That the SQL Agent job running the package is configured to select the correct environment (on the 'Configuration' tab, while in 'Edit Step').
The absence of evidence is not evidence of absence
- Martin Rees
The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
- Phil Parkin
February 6, 2018 at 8:56 am
Phil Parkin - Tuesday, February 6, 2018 7:13 AMslimchance99 - Tuesday, February 6, 2018 7:06 AMPhil Parkin - Monday, February 5, 2018 2:43 PMslimchance99 - Monday, February 5, 2018 2:08 PMI have a package where network file paths are set up as package parameters, and these parameters are referenced in package variables that concatenate with file names read from file enumeration loops. Something like @[$Package::parWorkingFIlePath] + @[User::usrXMLFileNamePath]Everything works fine in VS. My deployment plan was to use environment variables to read in the testing/production file paths from environment variables to the parameters on the server. On the server all of the variables that reference the package parameters populated from the environment variables fail validation, with a message that the 'expression cannot be parsed'.
I saw a mention somewhere that environment variables cannot be referenced by package variables. Is this the case? If so what would be the best method to pass the folder paths to the package variables?
Thanks
Environment variables pass values to parameters, which are then read-only throughout package execution.
Package variables can reference the values of parameters (as passed in from an environment variable), no problem.
Does that help at all?That is my understanding, and that is how the packages are built. but for some reason all of my package variables that reference the parameters show validation errors on the server (no problem in VS)
thanks
SSDT does not use SSISDB environment variables, if you are referring to 'Debug' mode.
Did you double check that
a) The correct environment has been mapped to the correct project (using 'Configure'), and
b) That the variable mappings have been made correctly (also using 'Configure'), and
c) That the SQL Agent job running the package is configured to select the correct environment (on the 'Configuration' tab, while in 'Edit Step').
a,b and c - all checked and double checked. I've deployed numerous projects to this server previously using the same method with no issue, so this one has me scratching my head a bit. Thanks for weighing in.
Tim
February 6, 2018 at 9:05 am
Hmm, OK.
Where, exactly, are you seeing this message?
..., with a message that the 'expression cannot be parsed'.
The absence of evidence is not evidence of absence
- Martin Rees
The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
- Phil Parkin
February 6, 2018 at 9:15 am
Phil Parkin - Tuesday, February 6, 2018 9:05 AMrepHmm, OK.
Where, exactly, are you seeing this message?..., with a message that the 'expression cannot be parsed'.
Show up on the server execution report for the package. See attached...
Tim
February 6, 2018 at 11:31 am
OK, this is getting tough 🙂
Are any of the parameters marked as Sensitive?
Can you confirm from the All Executions reports that the values of the parameters are correctly being passed to the package at runtime?
The absence of evidence is not evidence of absence
- Martin Rees
The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
- Phil Parkin
February 12, 2018 at 9:25 am
Phil Parkin - Tuesday, February 6, 2018 11:31 AMOK, this is getting tough 🙂Are any of the parameters marked as Sensitive?
Can you confirm from the All Executions reports that the values of the parameters are correctly being passed to the package at runtime?
To make a long story short, there must have been something wonky in the project. I created a new project and copied the packages into it. Deployed and everything worked fine. Cause is still a mystery, but I've moved on. Thanks for the input.
Tim
Viewing 11 posts - 1 through 10 (of 10 total)
You must be logged in to reply to this topic. Login to reply