Hitachi Vantara Pentaho Community Forums
Results 1 to 3 of 3

Thread: Mapping (sub transformation) by variable

  1. #1
    Join Date
    Mar 2016
    Posts
    5

    Default Mapping (sub transformation) by variable

    I am connected to a file based repository using PDI 7.1.

    Using Mappings from my repository usually works without any issues, if I specify the sub-transformation via the "browse" button - a relative path is then inserted into the field "transformation" like e.g. "/FOLDER/SUBFOLDER/MY_MAPPING".
    If I put the very same string into a parameter (let's say ${MAPPING_FILE}) and insert that into the field "transformation" it fails with a NullPointerException - apparently the mapping file cannot be loaded.

    I also tried to append the suffix ".ktr" and use absolute paths ... all failed so far.

    How can I use variables to specify the sub-transformation while connected to a repository? Is that even possible or am I on to a bug I should report?

    Works:


    Fails:

  2. #2
    Join Date
    Mar 2016
    Posts
    5

    Default

    Ha ... I finally figured it out by studying the XML in the .ktr file.

    For anyone else who wants to reference sub-transformations dynamically using parameters:
    The transformation cannot be referenced in a single parameter, but has to be split up into a path portion and the filename.

    ${MAPPING_FILE} --> "/FOLDER/SUBFOLGER/MY_MAPPING" does not work
    ${MAPPING_PATH}/${MAPPING_FILENAME} --> "/FOLDER/SUBFOLDER/MY_MAPPING" does work

  3. #3
    Join Date
    Aug 2016
    Posts
    290

    Default

    Good to know, that's the only place I've heard of which requires separated arguments to form a path.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.