Uploaded image for project: 'Apache Hop (Retired)'
  1. Apache Hop (Retired)
  2. HOP-3783

Add label to nodes based on key/value of previous hop in Neo4j Graph Output

    XMLWordPrintableJSON

Details

    Description

      I'm looking to find a way to add a label to a new/existing Node based on the key and value from the previous hop.

      Example:
      Table Input outputs a field name "instance" with field value "value1". This gets sent to Neo4j Graph Output that will add the label "Public" to a Node already labeled with "IPAddress". If "instance" has any other value, then I do not want to add the label "Public" to the node.

      Query:

      LOAD CSV WITH HEADERS FROM 'file:///input.csv' AS row
      WHERE row.instance = "value1"
      MERGE (i:IPAddress {ip: row.ip}) SET i:Public RETURN i;
      

       
      I'm pretty sure that should be a sample query that should accomplish what I'm trying to do.

      Attachments

        1. image-2022-02-24-11-36-18-845.png
          20 kB
          Matt Casters
        2. image-2022-02-24-11-36-34-017.png
          20 kB
          Matt Casters

        Issue Links

          Activity

            People

              mcasters Matt Casters
              rshift Jeremy Galindo
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m