How to write data in Multiples neo4j Dbs's

Viewed 11

Hi I having some problems trying to write data in Neo4j 4, i need write the same data in 2 different DBs

def deploy_map(tx, dataToWrite: dict):
for db in DB_TO_WRITE:
    for record in tx.run("use " + db + " call lex.loadMap($map) yield value return value", map=dataToWrite):
        response = record["value"]
        print(f"{response} db: {db}")

but I receiving the coming error:

ClientError: {code: Neo.ClientError.Statement.AccessMode} {message: Writing to more than one database per transaction is not allowed. Attempted write to Internal{graphId=0, uuid=307ebd9b-e80c-4e1d-a7db-d2521be9dd9b, databaseName='DB-b', uri=RemoteUri{scheme='bolt', addresses=[server name], query='null'}}, currently writing to Local{graphId=1, uuid=a64bc790-91e7-486b-8708-695e07fbcb32, databaseName='DB-a'}}

0 Answers
Related