Dynamic Properties Task
The Dynamic Properties task works by retrieving values from sources outside a Data Transformation Services (DTS) package at package run time and assigning those values to selected package properties. Typically, the external values assigned by the task are unknown until package run time. Therefore, a package may need to:
- Get data from a backup file, where the file name changes according to the date.
- Connect to an available server, where the name of the server is not known until package run time.
- Run a scheduled query on a set of data for a particular date range. The package must update the date range for each execution and change the source SQL statement accordingly.
Available Source Types
The Dynamic Properties task can assign external data or information to a package property from one of the following sources:
- An initialization (*.ini) file, such as Win.ini, or any initialization file that you want to create. This selection only supports property values a single line in length.
- A data file containing a property value that can be read and assigned. Unlike the initialization file selection, the data file selection supports property values greater than one line in length.
- A query. When you assign the results of a query to a DTS package property, the Dynamic Properties task uses only the results of the first column of the first row. For this reason, consider designing your queries so they generate a single result (for example, a COUNT, SUM or SELECT statement for a particular name).
- A DTS package global variable. For more information, see Using Global Variables with DTS Packages.
- An environment variable, which can encompass any available user or system variable (for example, COMPUTERNAME, LOGONSERVER, and so on).
- A constant, commonly used to assign a default value to a property in the event a previous assignment fails.
To add a DTS task to a DTS package