Data360 Analyze

 View Only
  • 1.  Create a Temporary List or Set in Transform Node

    Posted 12 days ago
    Edited by Daniel Pisani 10 days ago

    Hey all,

    I've gotta be missing something very easy, so hoping someone can share some wisdom. I'm using a Transform node to go through a list of tickets. Each ticket can have anywhere from 5 to 20 rows with various datapoints, and one of those is Department. 

    Edited for simplicity

    End of day, I'm trying to understand whether a TICKET_NUMBER has ever been assigned to a Department. If there is a better idea, let me know, but for now I thought I'd use a simple list. At Row 1, check my empty groupList [ ] and if Department isn't already inside, append it into the list then I'll perform some unique calculations based on it having not already been part of the List. 

      TICKET_NUMBER Submit Date/Time Department
    1 8571622 3/1/2024 12:00:00 AM Engineering
    2 8571622 3/2/2024 12:00:00 AM Engineering
    3 8571622 3/3/2024 12:00:00 AM Engineering
    4 8571622 3/4/2024 12:00:00 AM Engineering
    5 8571622 3/5/2024 12:00:00 AM Engineering
    6 8571622 3/6/2024 12:00:00 AM Network Operations Center
    7 8571622 3/7/2024 12:00:00 AM Network Operations Center
    8 8571622 3/8/2024 12:00:00 AM Technical Support
    9 8571622 3/9/2024 12:00:00 AM Technical Support
    10 8571622 3/10/2024 12:00:00 AM Technical Support
    11 8571622 3/11/2024 12:00:00 AM Network Operations Center
    12 8571622 3/12/2024 12:00:00 AM Network Operations Center
    13 8571622 3/13/2024 12:00:00 AM Network Operations Center
    14 8571622 3/14/2024 12:00:00 AM Network Operations Center
    15 8571622 3/15/2024 12:00:00 AM Network Operations Center
    16 8571622 3/16/2024 12:00:00 AM Network Operations Center
    17 8571622 3/17/2024 12:00:00 AM Network Operations Center
    18 8571694 3/29/2024 12:00:00 AM Technical Support


    ------------------------------
    Daniel Pisani
    Knowledge Community Shared Account
    ------------------------------



  • 2.  RE: Create a Temporary List or Set in Transform Node

    Posted 10 days ago

    Hi, for me it would be a lot easier to understand. If you send pictures of a sample data input, and expected output.

    Like below:




    ------------------------------
    Henrik B
    E.ON Sverige
    ------------------------------



  • 3.  RE: Create a Temporary List or Set in Transform Node

    Employee
    Posted 10 days ago
    Edited by Ernest Jones 10 days ago

    What you are describing that you are doing is similar to what I've done very often lately.  So I am pretty sure that the problem you are dealing with is a typo or mistake.

    Here is a simple way to do what I understand you are asking for using an Agg node:

    Input:

    Agg:

    Note that the second parameter of the joinStrings() function indicates whether or not to include Nulls in the result.

    outputs[0]["DPTs"] = group.joinStrings(fields["DPT"],False," | ")

    Output:



    ------------------------------
    Ernest Jones
    Precisely Software Inc.
    PEARL RIVER NY
    ------------------------------