Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
08-18-2022 03:21 AM
Hello,
I want to load shacl data on neo4j startup.
The following works to load "ordinary" graph data (in plan.cypher) and validation data (in validation.cypher)
I added the following to my neo4j.conf:
dbms.security.procedures.unrestricted=apoc.*
I added the following to my apoc.conf:
apoc.import.file.enabled=true
apoc.import.file.use_neo4j_config=true
apoc.initializer.neo4j.0=CALL apoc.cypher.runFile("file:///plan.cypher")
apoc.initializer.neo4j.1=CALL apoc.cypher.runFile("file:///validation.cypher")
My plan.cypher contains a CREATE statement where I set up the graph. That works like a charm.
My validation.cypher contains the following:
CALL n10s.graphconfig.init({handleVocabUris:"IGNORE"}) yield param;
CREATE CONSTRAINT n10s_unique_uri IF NOT EXISTS ON (r:Resource) ASSERT r.uri IS UNIQUE;
CALL n10s.validation.shacl.import.inline('
.... turtle file ....','Turtle') YIELD target RETURN target
If my validation.cypher only contains ...
CALL n10s.graphconfig.init({handleVocabUris:"IGNORE"}) yield param;
..., that works just fine.
That leaves me confused and I don't know if that's a bug in neosemantics or apoc or whether this behavior is actually supposed to work.
If I give my files to cypher-shell directly, everything works like a charm. I could provided stripped down versions of my file if that's helpful.
08-22-2022 08:23 AM
Hello @max_beikirch
If you are still facing an issue here, can you please create a GitHub ticket and provide as much detail as possible including logs and configs, etc., and share a link to your GitHub ticket in reply to this thread. Or if you have a support contract open a ticket.
If you could resolve the issue, please reply with what you did to solve the problem so others can benefit from your troubleshooting!
All the sessions of the conference are now available online