A plugin to nodestream for building a graph of the schema of the graph.
Project description
Nodestream Meta Plugin
This plugin allows you to build a Graph of your Graph's Schema.
Installation
pip install nodestream-plugin-meta
Meta-Schema
The schema of the graph schema is as follows:
For extra meta characteristics, the schema of the schema schema is also added to the projects schema like any other pipeline.
In other words, the types NodeType
, Property
, and so on are added to the schema of the graph.
Getting Started
Unlike other schema plugins, this plugin uses the ingestion system to build the metagraph in your graph. That means that you need to build a pipeline to do the ingestion. For the simple case, you can build a single step pipeline that looks like this:
- implementation: nodestream_plugin_meta:SchemaRenderer
This will locate the project file located inside the current working directory (or its parent directories) and render the schema to the graph. You can also specify the path to the project file:
- implementation: nodestream_plugin_meta:SchemaRenderer
parameters:
project_path: /path/to/nodestream.yaml
You may also specify an overrides file to enrich the inferred schema:
- implementation: nodestream_plugin_meta:SchemaRenderer
parameters:
project_path: /path/to/nodestream.yaml
overrides_path: /path/to/overrides.yaml
The overrides file should look like this:
nodes:
- name: Person
properties:
is_cool:
type: BOOLEAN
relations:
- name: Knows
properties:
since:
type: DATE
The file is merged with the inferred schema, so you can add new nodes, relations, or properties, or override parts of existing ones.
Querying the Meta Graph
The meta graph can be queried like any other graph data. For example, to get all the node types in the graph:
MATCH (n:NodeType) RETURN n.name
Or to get all the properties of a node type:
MATCH (n:NodeType {name: 'Person'})-[:HAS_PROPERTY]->(p:Property) RETURN p.name, p.type, p.is_key
Same goes for relations and their properties:
MATCH (r:RelationshipType {name: 'Knows'})-[:HAS_PROPERTY]->(p:Property) RETURN p.name, p.type, p.is_key
Also you can get the adjacencies the graph schema:
MATCH (a:NodeType)<-[:TO|FROM]-(adj:Adjacency)-[:TO|FROM]->(b:NodeType)
MATCH (adj)-[:THROUGH]->(r:RelationshipType)
RETURN a.name, r.name, b.name
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file nodestream_plugin_meta-0.13.0.tar.gz
.
File metadata
- Download URL: nodestream_plugin_meta-0.13.0.tar.gz
- Upload date:
- Size: 7.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c31f17857e2cfebcfe6353d73ebcd3562110787b6be79459ce9dc9a740daf375 |
|
MD5 | f1185f1f2ac5474b10e0cd187270efd4 |
|
BLAKE2b-256 | 34619e37d1d3277102aa0d9c48c9c4989582b7f25e50095672de58103d5e5cb1 |
Provenance
The following attestation bundles were made for nodestream_plugin_meta-0.13.0.tar.gz
:
Publisher:
release.yaml
on nodestream-proj/nodestream-plugin-meta
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
nodestream_plugin_meta-0.13.0.tar.gz
- Subject digest:
c31f17857e2cfebcfe6353d73ebcd3562110787b6be79459ce9dc9a740daf375
- Sigstore transparency entry: 149881351
- Sigstore integration time:
- Predicate type:
File details
Details for the file nodestream_plugin_meta-0.13.0-py3-none-any.whl
.
File metadata
- Download URL: nodestream_plugin_meta-0.13.0-py3-none-any.whl
- Upload date:
- Size: 8.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 85a53efd2dd26d69278712b36a2013644f5b7dcfcc81ab95dada454bd3cb4edf |
|
MD5 | e46f315a6d648d1157614adaa0940dc8 |
|
BLAKE2b-256 | ddc5ab66917a05ee6f023643ce2ab287ef98ca80ace1034493ca44ed97be1561 |
Provenance
The following attestation bundles were made for nodestream_plugin_meta-0.13.0-py3-none-any.whl
:
Publisher:
release.yaml
on nodestream-proj/nodestream-plugin-meta
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
nodestream_plugin_meta-0.13.0-py3-none-any.whl
- Subject digest:
85a53efd2dd26d69278712b36a2013644f5b7dcfcc81ab95dada454bd3cb4edf
- Sigstore transparency entry: 149881353
- Sigstore integration time:
- Predicate type: