Data360 Analyze

 View Only
  • 1.  Reusing some nodes but get errors

    Posted 02-26-2021 08:00

    Hi,

    I have a section of a graph that I use frequently in different projects(like a starting template).  I am getting an error on the merge node that a field doesn't exist.  So my right input field names are always the same.  The left input will change in each graph.  Issue is it thinks some of the previous fields from the left join are missing as per the error.  The reason I want to reuse this merge join is my right input has hundreds of fields so I have excluded a bunch of them in this join.  (don't want to have to click a hundred exclude fields each time I do this by pulling in a new merge).  Any idea's why this is happening?  I tried to clear the cache but that didn't work.



  • 2.  RE: Reusing some nodes but get errors

    Employee
    Posted 03-04-2021 13:11

    Normally changing the metadata of a node wouldn't cause this error, but there is a use case where it would cause this issue: when a field is renamed or excluded. On the back-end (visible by switching to the Advanced tab under the Merge node's ConfigureFields property), there is Python code that is performing the rename and exclusion. This code doesn't get removed if one of the input pins changes, so the added code that is looking to rename or exclude the field isn't finding the field anymore and throwing the error.

    For removed fields, you'll see something like this in the code:

    outputs[1] -= inputs[0]['fieldToRemove']

    For renamed fields, it will be two lines:

    outputs[1] -= inputs[0]['oldName']
    outputs[1]['newName'] = inputs[0]['oldName']

    Instead of clicking through each of the excludes, it may be easier in your use case to work with the node via the Merge node's ConfigureFields property's Advanced tab. Since it's a textbox, it would be easier to remove / edit large portions of the code at once.

     

    Note that once you edit the Advanced code, it will intentionally blank out your the ConfigureField property's "Field List" (default) view because custom code wouldn't be compatible with the standard UI-driven approach. If you need to switch back to the old view, click the Field List tab and use the instructions below to repopulate the default values. This will override the custom Advanced code to bring the node back to the out-of-the-box behavior while maintaining any other node changes.

    1. Specify an Output pin of "left orphans"
    2. Click Add New Pattern
    3. Click Left fields
    4. Repeat steps 1-3 for Right orphans with Right fields
    5. Repeat steps 1-3 for Matched with both Left and Right Fields

    Sample of steps 1-3 are below:



  • 3.  RE: Reusing some nodes but get errors

    Posted 03-09-2021 10:24

    Thanks!!  I'll give it a try!