I am new to using neo4j through python. I wanted to use APOC to read in a json file using python and populate a graph database. The JSON file is already in a neo4j required structure to create nodes and relationships.
When running the query CALL apoc.load.json("file:///xyz.json")
in neo4j Browser it runs fine and populates the nodes and relationships. But when I do it in python using py2neo it prints out the json file and nothing is added to the database when I check it in browser.
Python Code:
`from py2neo import Graph
g = Graph("bolt://localhost:7687", auth=("neo4j", "password"))
query = """
CALL apoc.load.json("file:///xyz.json")
"""
g.run(query)
`
The Json file is kept in import folder of the db.