You can parameterize the connection, objects, and the advanced runtime properties in mappings.
To parameterize the connection, objects, and the advanced runtime properties using a parameter file, create the parameters in the Parameters panel when you create a mapping. Then, define the parameters in the parameter file, place the parameter file in the following location, and run the mapping task:
You can also save the parameter file in a cloud-hosted directory in Microsoft Azure Data Lake Storage Gen2.
You cannot save the parameter file in a cloud-hosted directory for a mapping in advanced mode.
Consider the following rules and guidelines when you use parameterization:
General guidelines
- When you create a mapping with a parameterized target that you want to create at runtime, set the target field mapping to automatic.
- You cannot parameterize the field mapping.
- When you run a completely parameterized mapping where you specify a relative path in the target connection and root in the directory path in the parameter file, the file path is incorrectly formed at runtime. To overcome this, replace the <directory name> in the directory path with the <filesystem name> in the parameterized target object. For example, if the directory path in the target object path is <directory name>/csv/dir/<file name>, replace <directory name> with the <filesystem name> in the parameter file.
Mappings
- When you use input parameters, specify the parameter name in the following format:
▪ Format in a mapping task: $name$
▪ Format in a parameter file: $name
- When you use in-out parameters, specify the parameter name in the following format in a mapping task or a parameter file: $$name.
- You cannot parameterize a Microsoft Azure Data Lake Storage Gen2 target created at runtime. Instead, you can specify the parameter in the Directory Override to parameterize the target using a parameter file. Specify the parameter in the following format: $$name or $name.
Mappings in advanced mode
- When you use input parameters, specify the parameter name in the following format in a mapping task: $name$.
- When you use input parameters in a parameter file to parameterize the connection or object, the parameter value is stored in the following format: $$name.
- You cannot use input parameters in a parameter file to parameterize the advanced properties at runtime.
- Ensure that you create the parameter before you override it using a parameter file.
- You cannot parameterize only the connection. You can either paramaterize both the connection and the object or only the object.
- You cannot parameterize hierarchical data types.
- When you parameterize the object, ensure that the metadata of the imported object matches the metadata fetched in the override.
- When you use the parameter file to parameterize the source or target objects, you must specify the absolute path of the objects.
For example, $$SrcObj=<Directory1>/.../<DirectoryN>/<FileName>;
- When you parameterize the connection or object, ensure that the connection or object that you want to override exists in Microsoft Azure Data Lake Storage Gen2.