You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: nodestream_plugin_neo4j/ingest_query_builder.py
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -117,7 +117,7 @@ def _make_relationship(
117
117
returnf"{create_rel_query}{set_properties_query}"
118
118
119
119
ifset_first_ingested_at:
120
-
merge_rel_query=f"{merge_rel_query} ON CREATE SET {RELATIONSHIP_REF_NAME}.first_ingested_at = datetime()"
120
+
merge_rel_query=f"{merge_rel_query} ON CREATE SET {RELATIONSHIP_REF_NAME}.first_ingested_at = params.{generate_prefixed_param_name(PROPERTIES_PARAM_NAME, RELATIONSHIP_REF_NAME)}['last_ingested_at']"
# property and we are in the merge case. Because MATCH will not
143
143
# create the node.
144
144
ifself.set_first_ingested_at:
145
-
query=f"{query} ON CREATE SET {GENERIC_NODE_REF_NAME}.first_ingested_at = datetime()"
145
+
query=f"{query} ON CREATE SET {GENERIC_NODE_REF_NAME}.first_ingested_at = params.{generate_prefixed_param_name(PROPERTIES_PARAM_NAME, GENERIC_NODE_REF_NAME)}['last_ingested_at']"
"""MATCH (from_node: TestType) WHERE from_node.id = params.__from_node_id MATCH (to_node: ComplexType) WHERE to_node.id = params.__to_node_id
330
+
MERGE (from_node)-[rel: RELATED_TO]->(to_node) ON CREATE SET rel.first_ingested_at = params.__rel_properties['last_ingested_at'] SET rel += params.__rel_properties
0 commit comments