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.  What can you do if a field name changes in your underlying data?

    Employee
    Posted 03-14-2013 05:38

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

    Originally posted by: svimes

    Say you import a table with the field name Vegetable. you then do some filters and joins based on Vegetable.

    The table then changes its field name from Vegetable to Field_Vegetable. Is there some way of globally replacing all nodes that reference Vegetable to Field_Vegetable?

    If not is there some way of dynamically linking field names so that it does change the node script changes as well?

    Thanks


  • 2.  RE: What can you do if a field name changes in your underlying data?

    Employee
    Posted 03-21-2013 05:48

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

    Originally posted by: rotsmane

    You can use global graph parameters to achieve this.

    1. In the bre go to graph > edit paramters.
    2. In this window you can create a new parameter in the parameter declarations tab. Set this to be a string param. Call it something like "VegetableField".
    3. In the parameters 1 tab, enter a value for this parameter, so for now it would be "Field_Vegetable", the new name.
    4. In your filter, don't refer to the actual name of the field, but instead use the new parameter you have created.

    So, for example in your filter node you would use the following code to emit the Field_Vegetable field:

    emit {{^VegetableField^}}

    Then, whenever that field name changes in the future you can simply update your global paramter to reflect the change, rather than having to change every node.


  • 3.  RE: What can you do if a field name changes in your underlying data?

    Employee
    Posted 03-26-2013 10:08

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

    Originally posted by: svimes

    Thanks - will try that. This means though that I cannot do it retrospectively as all my nodes would have to have been written with {{^VegetableField^}} rather than Vegatable?


  • 4.  RE: What can you do if a field name changes in your underlying data?

    Employee
    Posted 03-26-2013 12:10

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

    Originally posted by: stonysmith

    You could simply use:
    emit {{^VegetableField^}} as Vegetable

    That way all the downstream nodes would continue to use the (old) field name.


  • 5.  RE: What can you do if a field name changes in your underlying data?

    Employee
    Posted 03-27-2013 03:56

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

    Originally posted by: aop

    Originally posted by: svimes
    					

    Thanks - will try that. This means though that I cannot do it retrospectively as all my nodes would have to have been written with {{^VegetableField^}} rather than Vegatable?
    If replacing Vegetable with {{^VegetableField^}} by opening each node seems too time consuming you might want to open the .brg project file in text editor and do the replace there at once. I would, however, look into this option only if it is really necessary.