Hitachi Vantara Pentaho Community Forums
Results 1 to 4 of 4

Thread: Re-use mapping to translate a single field

  1. Default Re-use mapping to translate a single field

    I have a streams from different tables which have in common a single field that can contain a comma separated list of key values which I need to translate into another set of values and concatenate to a CSV value again. The translation requires a database lookup, so it is not a fixed list.

    I try to create a mapping, but I can't get the mapping input and output to just pass through all fields but the one I want to translate.

    Any pointers how to do this? any answers to the following questions?

    For example what means: the Input/output option "Ask the values to be renamed back on output?"

    Also what does it mean in the Input-Mapping step: "Include unspecified fields ordered by name?"

    Last but not least: Why would my output mapping specification form be all but a name (not fields to be mapped)? Some of the samples I can find do contain fields in that form.

  2. #2
    Join Date
    Jun 2012
    Posts
    5,534

    Default

    Quote Originally Posted by PlanBForOpenOffice View Post
    I have a streams from different tables which have in common a single field that can contain a comma separated list of key values which I need to translate into another set of values and concatenate to a CSV value again. The translation requires a database lookup, so it is not a fixed list.
    Either I get it all wrong or you are trying to complicate things using a Mapping step. See attachment.

    Quote Originally Posted by PlanBForOpenOffice View Post
    For example what means: the Input/output option "Ask the values to be renamed back on output?"
    Your input fields get renamed by the field mapping you provide on the input tab. If you want the name mapping to be reverted on exit of your subtransformation, check this option.

    Quote Originally Posted by PlanBForOpenOffice View Post
    Also what does it mean in the Input-Mapping step: "Include unspecified fields ordered by name?"
    A convenience option to add all remaining input fields to the input mapping without renaming.

    Quote Originally Posted by PlanBForOpenOffice View Post
    Why would my output mapping specification form be all but a name (not fields to be mapped)? Some of the samples I can find do contain fields in that form.
    Silly idea, but if you are missing some controls, try to resize the dialog window.
    Attached Files Attached Files
    So long, and thanks for all the fish.

  3. Default

    Thanks Marabu for the reply.

    And thanks for the attachment. That is roughly what my mapping looks like. The issue I have is I have a table A and a table B (and many more) and I want to re-use the transformation of the CSV field as a mapping. So my stream A has fields like A1, A2, A3, X and X is the CSV field I need to translate. While stream B has B1, ..., B12, X (where Ax and Bx have nothing in common). So I'd like to see A1, .. A3, X and Y [X translated] as the output fields in the case of stream A and B1, ..., B12, X, Y in case of stream B calling the mapping.

    But so far I only was able to achieve that by adding to the mapping input all the fields A1, ... A3, X and then I mapping them in the input step of the actual mapping. How can I have the fields that are not mapped being passed through transparently?

  4. Default

    I guess I got caught up in trying to understand the options. I tested again the "Include unspecified fields ordered by name" and it seems to do the main part of what I want.

    I'll also try the "Ask the values to be renamed back on output" again, as that seems convenient, to make things really a drop in step I can re-use. But for that I have to get the result into the field I use for input I guess. But marabu's sample does show a way to do that.

    Thanks again marabu!

Tags for this Thread

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.