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

Step 1. Configure the Date to String template

Step 1. Configure the Date to String template

Use the
Cloud Integration Template Designer
to configure and publish the Date to String Visio template.
Use objects in the Informatica stencil to create the data flow in a Visio template. Add and configure objects and links. When the template is complete, validate and publish the template. Then create an image file. You will use the image file when you upload the Visio template to your
Data Integration
organization.
  1. To create a new template, click
    File
    New
    Custom Visio Template
    Create
    .
  2. To save and name the file, click
    File
    Save
    . Select a local directory and name the file: DateToString.vsd.
    VSD is the default file type for the
    Cloud Integration Template Designer
    .
  3. From the Informatica stencil, add a Source Definition object to the template. Double-click the Source Definition icon.
  4. In the
    Source Definition Details
    dialog box, configure the following source definition properties.
    To configure a property, select the property you want to configure. In the Property area, enter the value you want to use, and click
    Apply
    .
    Source Definition property
    Value
    Transformation Name
    $DBsrc$
    Source Table
    $DBsrc$
    For sources, use the same template parameter name for the transformation name and source table. Sources are always template parameters, regardless of whether you enclose the name in dollar signs, but use dollar signs to clearly indicate it is a template parameter to other users.
  5. Add a Source Qualifier object to the data flow, and configure the following property:
    Source Qualifier property
    Value
    Transformation Name
    SQ
  6. Add a Link object between the Source Definition to the Source Qualifier. Double-click the link to configure link rules.
  7. To name the link, in the
    Link Rules
    dialog box, in the
    Rule Set Name
    field, enter
    All
    .
  8. To configure a link rule that moves all data from the source to the source qualifier, click
    New Rule
    . In the
    Define Link Rule
    dialog box, click
    Include
    , click
    All Ports
    , and click
    OK
    .
  9. To save your changes and close the
    Link Rules
    dialog box, click
    OK
    .
  10. To configure the expressions to convert dates to strings, add an Expression object to the data flow. On the
    Property
    tab of the
    Expression Details
    dialog box, configure the following property:
    Expression Details
    Value
    Transformation Name
    EXP_DateConversion
  11. On the
    Configuration
    tab, click
    New Expression
    , then configure the following details and click
    Apply
    .
    This expression declares the macro variable name. It also sets up the "port" variable to represent all ports, and defines the macro variable fields to include all ports.
    New Expression Details
    Value
    Port Name
    Declare_%enums%
    Expression
    {"port":"All Ports"}
  12. Configure another expression as follows and click
    Apply
    .
    The macro statement defines the output ports. With the use of the "port" variable, it names output ports "<output port>_o".
    The macro expression determines if a port contains a date of the $fromdateformat$ template parameter format. If it does, it converts the date to the $todateformat$ template parameter format. Then, it converts the date to a string.
    New Expression Details
    Value
    Port Name
    %port%_o
    Expression
    iif(IS_DATE(%port%,'$fromdateformat$'),TO_CHAR(TO_DATE(%port%,'$fromdateformat$'),'$todateformat$'),%port%)
  13. To configure a link rule that moves all data from the source qualifier to the Expression object, click
    New Rule
    .
    In the
    Define Link Rule
    dialog box, click
    Include
    , click
    All Ports
    , and click
    OK
    .
    To save the link rule, click
    OK
    .
  14. Add a Target Definition object to the data flow. Configure the target definition as follows.
    Target Definition property
    Value
    Transformation Name
    $tgt$
    Target Table
    $tgt$
  15. To configure a link rule that moves data from the Expression object to the target definition, click
    New Rule
    .
    In the
    Define Link Rule
    dialog box, click
    Include
    .
    To include all ports that end in "_o", with click
    Pattern
    and for
    Starting Port Pattern
    , enter "_o$". Click
    OK
    .
    To save the link rule, click
    OK
    .
  16. To validate the Visio template, on the Informatica toolbar, click
    Validate Mapping Template
    .
  17. To save the Visio template, click
    File
    Save
    .
  18. To create an image file, click
    File
    Save As
    . Save the file as JPEG or PNG.
    You can use the Arrange All icon on the Informatica toolbar to arrange the data flow before taking the screenshot.
  19. To publish the Visio template, on the Informatica toolbar, click
    Publish Template
    . Navigate to the directory you want to use, and click
    Save
    .
    The
    Cloud Integration Template Designer
    creates the template XML file.
  20. Save and close the Visio template.

0 COMMENTS

We’d like to hear from you!