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.  CSV Node - FieldNames value ( under Optional Tab)

    Employee
    Posted 08-24-2015 08:42

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

    Originally posted by: jpstory

    Hi
    How do I populate the result of a Filter node (a long string of field names separated by comma) on to the "FieldNmaes" under the Optional tab in CSV node?


  • 2.  RE: CSV Node - FieldNames value ( under Optional Tab)

    Employee
    Posted 08-24-2015 09:54

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

    Originally posted by: ltolleson

    Copy and Paste the code below into BRE. The output of this should be a list of fields separated by a comma. You can remove the Static Data node and connect the output of your filter into the Get Metadata node.

    --------------------------------------------------------------------------

    node:Static_Data_2
    bretype:core::Static Data
    editor:sortkey=55db4b871dcd074e
    output:@40fe6c55598828e5/=
    editor:XY=330,450
    end:Static_Data_2


    node:Get_Metadata
    bretype:lal1::Get Metadata
    editor:sortkey=55db4b2e2a0b1654
    input:@40fd2c74167f1ca2/=Static_Data_2.40fe6c55598828e5
    output:@40fd2c7420761db6/=
    editor:XY=450,450
    end:Get_Metadata


    node:Agg_Ex
    bretype:core::Agg Ex
    editor:sortkey=55db4b4473fb6ed6
    input:@4b4668c040aa5a85/=Get_Metadata.40fd2c7420761db6
    output:@4b4668e708143fb4/=
    prop:GroupBy=<<EOX
    1
    EOX
    prop:Script=<<EOX


    FieldNames = groupString('FieldName', ",")


    emit FieldNames
    where lastInGroup


    EOX
    editor:XY=560,450
    node:Bypass
    bretype:::Bypass
    editor:shadow=4b467f7e02db3a85
    input:@4b467f7e129d45c1/=
    input:@4b467f830ffe047b/=
    output:@40fd2c7436717256/=
    end:Bypass


    node:Sort
    bretype:::Sort
    editor:shadow=4b467f8972dc33df
    input:@40fd2c743ebf4304/=
    output:@40fd2c746a2a3b47/=
    end:Sort


    node:Agg
    bretype:::Agg
    editor:shadow=4b467f9b3d5028c0
    input:@40fd2c7427456e5b/=
    output:@40fd2c744c862db0/=
    end:Agg


    end:Agg_Ex


  • 3.  RE: CSV Node - FieldNames value ( under Optional Tab)

    Employee
    Posted 08-25-2015 06:35

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

    Originally posted by: jpstory

    Hi Larry

    Thanks for looking at this, apologies if I did not make my question clear.

    I can generate the long string, the question is how to "feed" this long string into the "FieldNames" section of a CSV node without manual copy and paste.

    Is it possible to set up a parameter and assign the long string value to it and then use the parameter in the CSV node?


  • 4.  RE: CSV Node - FieldNames value ( under Optional Tab)

    Employee
    Posted 08-27-2015 07:18

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

    Originally posted by: lnason

    I think you're going to need to use the "Execute BRX" node for this. There's no way to set the "FieldNames" parameter based on data from the input pin. Using the Execute BRX node will allow you to set these values dynamically.

    I've attached a simple example of how this might work.

    Instructions:
    - Save and expand all files into the same directory
    - Set the DataDirectory graph parameter in both brg files to the directory where you saved the files.
    - Save the "Input_CSV_FieldNames" graph as a brx into the same directory (File->Save as Executable->Save as BRX)
    - Run Input_CSV_Wrapper

    Let me know if you have any issues or questions.

    Luke

    CSV Node FieldNames Value.zip


  • 5.  RE: CSV Node - FieldNames value ( under Optional Tab)

    Employee
    Posted 08-27-2015 10:34

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

    Originally posted by: Bryt Park

    This is exactly what I needed, thanks!