LAE

Welcome to the LAE community!  Please feel free to start a discussion in the discussion tab or join in a conversation.

Discussions

Members

Resources

Events

 View Only
  • 1.  Rename fields based on "control spreadsheet"

    Employee
    Posted 01-27-2014 13:42

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: SambaDancer

    Dear Lavastorm lovers,

    Technical challenge: I'd like to perform an automated renaming of inputfields based on the information in an Excel spreadsheet.
    The first column of this spreadsheet contains the "target" fieldname, the second, third, etc. columns contain the source field names, 1 column for 1 ERP system.
    Thus, the spreadsheet is a translation table. This spreadsheet is centrally maintained by someone else.

    Slighty similar to the Data Analyzer node, I'd like Lavastorm to accept data from a particular input, accept the spreadsheet as a second input and then perform a sort of automated "emit field_X as field_Y". So the output would contain the target field names.

    Does anyone have a trick up their sleeve?

    Thanks so much in advance!!

    Warm greetings from The Netherlands,

    Bart Roeleveld (Coney).


  • 2.  RE: Rename fields based on "control spreadsheet"

    Employee
    Posted 01-27-2014 14:22

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: pdespot

    Hi, Bart.

    If I understand correctly, the Change Metadata node in the current LAL may do what you want. I've attached a sample graph. If you don't have it, the most up-to-date LAL is always available at http://www.lavastorm.com/resources/s...lytic-library/

    Please let me know if this is helpful.

    Regards,
    -Pavel

    Originally posted by: SambaDancer
    					

    Dear Lavastorm lovers,

    Technical challenge: I'd like to perform an automated renaming of inputfields based on the information in an Excel spreadsheet.
    The first column of this spreadsheet contains the "target" fieldname, the second, third, etc. columns contain the source field names, 1 column for 1 ERP system.
    Thus, the spreadsheet is a translation table. This spreadsheet is centrally maintained by someone else.

    Slighty similar to the Data Analyzer node, I'd like Lavastorm to accept data from a particular input, accept the spreadsheet as a second input and then perform a sort of automated "emit field_X as field_Y". So the output would contain the target field names.

    Does anyone have a trick up their sleeve?

    Thanks so much in advance!!

    Warm greetings from The Netherlands,

    Bart Roeleveld (Coney).

    Attachments:
    convert_example.brg


  • 3.  RE: Rename fields based on "control spreadsheet"

    Employee
    Posted 01-28-2014 02:35

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: Tim Meagher

    Hi,

    The Change Metadata node requires the types for the fields as well.
    If the spreadsheet doesn't contain the type information, and you just want a lookup to change the names rather than the field types, then the following graph may be of use.

    The attached graph has the first input from the static data node containing the original data.
    The second node just contains a map from the name in the original data to the name that should be used in the output.
    The Change Field Names node only needs to specify the original field name and new field name in the second input.
    A lookup extracts the type information from the first input, and then the Change Metadata node is used.

    Hope this helps,
    Tim.
    Attachments:
    convert_namesOnlyExample.brg