Skip to main content
100%

Gist 099e4d37161b6a93c9f60f524bb8382c

✓ Published0🌍 Public
Aakollegger
Last edited Mar 21, 2024
Created on Mar 21, 2024

This example demonstrates how to load and persist parameterized records into a Neo4j graph database using the official Neo4j Python driver. It shows a small dataset of four people, each tagged with a data source identifier, being merged into the database as `Record` nodes with unique IDs constructed from the source and record number. The code establishes a connection via `neo4j.GraphDatabase.driver`, iterates through the sample data, and executes a Cypher query with `session.run` to upsert each record, using `ON CREATE SET` to add properties only when the node is newly created. The visualization would reflect the resulting graph structure, though no rendering library is used here.

AI-generated description

Similar vizzes