How to use a SSIS parameter inside of an Execute Operation?

Victor Sotnikov 21 Reputation points
2022-04-28T13:44:41.687+00:00

I have an SSIS package SSIS with a parameter параметром $[Project::MyParam].
Inside the SSIS I have a component of Execute Process Task type. The component has a row Arguments; this is where I wany to put a value from $[Project::MyParam].
How should I do it?

SQL Server Integration Services
SQL Server Integration Services
A Microsoft platform for building enterprise-level data integration and data transformations solutions.
2,702 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Michael Taylor 60,161 Reputation points
    2022-04-28T15:32:30.077+00:00

    I'm assuming here that your parameter is probably not a string and you're trying to put it directly into the Arguments value of the Process tab. That won't work.

    Go to the Expressions tab. Then select the Arguments property. For the value use this (DT_WSTR, 100) @[$Package::MyParam] The argument must be Unicode string so this converts your parameter to a string and passes it as an argument. You can use the Evaluate Expression to confirm it is correct. Note that I tested this with a package-level parameter. If you're using a different scoped variable then it'll be different. The expression editor shows you all the things you have in scope so you can drag and drop the exact parameter you want instead of having to figure it out on your own.

    Image

    0 comments No comments

  2. ZoeHui-MSFT 41,491 Reputation points
    2022-04-29T03:01:40.057+00:00

    Hi @Victor Sotnikov ,

    You may use Property Expressions to set the parameter inside Execute Process Task.

    1.Open the Data Flow Task properties window.
    2.Click on the "..." beside the "Expressions". That will open the Property Expressions Editor.
    3.For the Property, select the Arguments
    4.For the Expression, click the "...", this will open the Expression Builder window in which you can expand the parameters node and drag and drop the parameter you want.

    197529-image.png

    use-property-expressions-in-packages

    Regards,

    Zoe


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.