-
Notifications
You must be signed in to change notification settings - Fork 0
4. Init options
Justin edited this page Jul 27, 2023
·
1 revision
The getl.init()
function have two optional parameters:
The filters
parameter can be used to filter which function having specific metadatas to parse and which nodes/edges to load.
They are created with the getl.Filter()
object:
filters = (
getl.Filter()
.add_edges(["AWARDED_FOR", "ACTED_IN"])
.add_nodes(["Movie", "Person", "Award"])
)
getl.init(filters=filters)
Using these filters in the imdb example, it won't load Director
nodes and neither DIRECTED
edges.
After each parsing, details are stored in a json file to help the loading in neo4j.
You can also add callbacks after each parsing, to create schema of your graph database.
Two callbacks are pre-made : getl.CallbackOWL()
and getl.CallbackSHACL()
They will respectively create an owl schema and a SHACL schema of the graph database when passed :
getl.init(callbacks=[getl.CallbackOWL(), getl.CallbackSHACL()])