// create the Enrich Graph node if value is not NA
FOREACH(ignoreMe IN CASE WHEN trim(line.EnrichGraph) <> "NA" THEN [1] ELSE [] END |
MERGE (enrichgraph:EnrichGraph { title:'Enrich Graph', name: line.EnrichGraph }))
// create the Enrich File node if value is not NA
FOREACH(ignoreMe IN CASE WHEN trim(line.EnrichFile) <> "NA" THEN [1] ELSE [] END |
MERGE (enrich:EnrichedFile { title:'Enriched File', name: line.EnrichFile }))
// create the Relationship only if both of them are not NA
FOREACH(ignoreMe IN CASE WHEN trim(line.EnrichFile) <> "NA" THEN [1] ELSE [] END |
FOREACH(ignoreMe IN CASE WHEN trim(line.EnrichGraph) <> "NA" THEN [1] ELSE [] END |
MERGE (enrichgraph)-[:PRODUCES]->(enrich) ) )