REST Source: How to modify the REST Source.ResourceParameter and REST Source.Resource properties dynamically at runtime

REST Source: How to modify the [REST Source].[ResourceParameter] and [REST Source].[Resource] properties dynamically at runtime

Modify [REST Source].[Resource] dynamically at runtime:

The source resource and filters are available in the data flow properties list. Follow these steps to set up an expression:
  • Create a variable that contains the name of the Resource to be provided dynamically at runtime. (See image #1.)
  • Right-click on the data flow canvas and select the Properties menu. This will bring you to the Data Flow Task properties. (See image #2 for remaining steps.)
  • Scroll down and find the properties in the group called Misc.
  • Scroll down and find the property named [REST Source].[Resource]. This is the property that will be dynamically set from a variable containing the resource name.
  • Scroll down and find the Expressions property. Set up an expression to modify the [REST Source].[Resource] dynamically using the variable.
Example expression:
  1. @[User::vResource_Name]
Image #1


Image #2


Modify [REST Source].[ResourceParameter] dynamically at runtime:

The [REST Source].[ResourceParameter] property is available in the data flow properties list. Follow these steps to set up an expression:
  • Create a variable that can be loaded with the desired additional parameters to be used dynamically at runtime. (See image #1.)
  • Right-click on the data flow canvas and select the Properties menu. This will bring you to the Data Flow Task properties. (See image #2 for remaining steps.)
  • Scroll down and find the properties in the group called Misc.
  • Scroll down and find the property named [REST Source].[ResourceParameter]. This is the property containing additional parameters for data insertion. The property is a string combination with format [name]=[value]. Each [name]=[value] is separated with a newline (\n) or (\r\n).
  • Scroll down and find the Expressions property. Set up an expression for the property [REST Source].[ResourceParameter] using a variable to modify it dynamically at runtime.
Example expression:
  1. Assuming two SSIS user variables vStart_Date and vEnd_Date have been created.
  2. "start_date=" + @[User::vStart_Date] + "\r\n" +  "end_date=" + @[User::vEndDate]
Image #1

Image #2


    Book a Presales Call


    Are you new to COZYROC and evaluating our solutions? 
    Book a Presales Call with us now and get 5% off SSIS+.