Table of Contents

Search

  1. Preface
  2. Mappings
  3. Mapping tutorial
  4. Parameters
  5. CLAIRE recommendations
  6. Data catalog discovery
  7. Visio templates

Mappings

Mappings

Overriding data objects with parameter files

Overriding data objects with parameter files

If you use a data object parameter in a mapping, you can override the object defined in the
mapping
task at runtime with values specified in a parameter file.
You cannot override source objects when you read from multiple relational objects or from a file list. You cannot override target objects if you create a target at run time.
When you define an object parameter in the parameter file, the parameter in the file must have the same metadata as the default parameter in the mapping task. For example, if you override the source object ACCOUNT with EMEA_ACCOUNT, both objects must contain the same fields and the same data types for each field.
  1. In the mapping, create an input parameter:
    1. Select
      data object
      for the parameter type.
    2. Select
      Allow parameter to be overridden at runtime
      .
  2. In the mapping, use the object parameter at the object that you want to override.
  3. In the mapping task, define the parameter details:
    1. Set the type to
      Single
      .
    2. Select a default data object.
    3. On the
      Schedule
      tab, enter the parameter file directory and file name.
  4. In the parameter file, specify the object to use at runtime. Perform one of the following tasks:
    • For sources other than flat file or FTP sources, precede the parameter name with two dollar signs ($$). For example, you have a parameter with the name ObjParam1 and you want to override it with the data object SourceTable. You define the runtime value with the following format:
      $$ObjParam1=SourceTable
    • For flat file and FTP sources, precede the parameter name with one dollar sign ($). The following example is from a parameter file that's used to override the source directory, source file name, and remote file name for an FTP connection:
      #USE_SECTIONS [MyProjectFolder].[MappingTask_ftp] $Source_dir=/data/test/test_data/Test/ $Source_file=src_ff.txt $RemoteFileName=/root/FlatFile/Scotty/Test/src_14892_1.txt [Global]
  5. If you want to change the object, update the parameter value in the parameter file.

0 COMMENTS

We’d like to hear from you!