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.  Using one input as columns names for another

    Employee
    Posted 06-11-2009 11:41

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

    Originally posted by: mmulcahy

    Hi All,

    I have a data source where the field names are 6 character keys. I have another data source where these keys are mapped to descriptive names.

    I would like to convert the field names from keys to the descriptive names from the other file.

    Currently, the only way I can see to do this is to write a python script similar to rotate but takes two inputs and writes one output.

    Is there a simpler way? Am I missing something?

    Thanks a million for any help.
    Mike


  • 2.  RE: Using one input as columns names for another

    Employee
    Posted 06-15-2009 16:46

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

    Originally posted by: rboccuzzi

    Mike, currently, you are correct. You would write something very similar to Rotate, with two inputs. If you need some assistance with this node, please post here and someone can help you with that.

    While you have access to the names of inputs with inputFields, and you could iterate over those values, we don't allow the rename statement to occur inside a while loop, and the rename statement takes a constant string.

    In the future, a node such as you are describing could be included in one of our libraries, so I am interested in how it works out, and what your interface to the node ended up being.

    Cheers
    Rich


  • 3.  RE: Using one input as columns names for another

    Employee
    Posted 06-16-2009 08:40

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

    Originally posted by: mmulcahy

    Thanks for that Rich. Unfortunately I have been a bit side tracked so I'll let you know how I get on as soon as I get back to it.

    Thanks again,
    Mike


  • 4.  RE: Using one input as columns names for another

    Employee
    Posted 06-24-2009 15:11

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

    Originally posted by: rboccuzzi

    I have attached a graph with a node that should do what you want. Let me know how this works for you. It is called Rename Fields, and you can use it, I believe, as you described. I show an example in the graph section.

    Cheers
    Rich<br><br>Post edited by: rboccuzzi, at: 2009/06/24 17:14
    Attachments:
    Rename_Fields.brg


  • 5.  RE: Using one input as columns names for another

    Employee
    Posted 07-31-2009 16:23

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

    Originally posted by: mmulcahy

    Hi Rich,

    I finally got around to using it and it worked perfectly for me. Thanks a million for that, its much appreciated.

    Thanks again,
    Mike


  • 6.  RE: Using one input as columns names for another

    Employee
    Posted 08-28-2009 08:50

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

    Originally posted by: mermacora

    Just stumbled across this post and realised that we need to do the same field name mapping at MDS with data extracted from DISE DB tables.
    Another solution has been built and used over here, but Rich's "Rename Fields" node is a more elegant and efficient solution.
    Thanks Rich :-)
    Cheers,
    Mars


  • 7.  RE: Using one input as columns names for another

    Employee
    Posted 08-31-2010 13:21

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

    Originally posted by: ltolleson

    I was in the process of building the same type of node, but ran into this one that you had created. Works perfectly.

    Thanks,
    Larry