Graphmart Concepts
Graphmarts are containers that enable users to create, enhance, and manage knowledge graphs. When you construct a graphmart, you are defining the set of instructions to use for transforming your source data into the desired knowledge graph. Graphmarts are made up of data layers. Layers are containers for the steps that are applied to enhance graphmarts dynamically. The steps in a layer perform all of the data operations, such as loading additional datasets, inferring new data automatically, or running SPARQL queries to create views or clean, conform, transform, or validate the data in the layer. The sections below provide details about layers and steps.
Data Layers
The following list introduces the key features of data layers:
- You can create any number of layers in a graphmart and control which users and groups have access to the layers and the data within the layers.
- Users can toggle data layers on and off in Hi-Res Analytics dashboards.
- You can configure execution conditions on layers so that the layer is processed only when certain conditions are met.
- You cannot share data layers between graphmarts, but you can clone layers and include a copy in multiple graphmarts.
- You control the source data for steps in a layer. Layers can build upon the data generated by steps in previous layers or can be self-contained, applying changes only to the data defined in the layer.
- Each layer is stored as one named graph in AnzoGraph.
Steps
You can add any number of steps to a layer and can create the following types of steps:
- Direct Load Step: Runs a SPARQL query that invokes the Graph Data Interface (GDI) RDF and Ontology Generators to directly load a data source to a graphmart.
- Elasticsearch Indexing Step: Creates an Elasticsearch index to associate with a layer.
- Elasticsearch Snapshot Step: Creates an Elasticsearch snapshot of the index that is associated with a layer.
- Export Step: Exports the graphmart data in memory to a file-based linked data set (FLDS).
- Load Dataset Step: Loads a dataset from the Datasets catalog into a data layer graph. When you create a graphmart from the catalog, Anzo automatically creates a layer with a Load Dataset Step.
- Pre-compile Query Step: Runs the included query immediately after a graphmart is loaded so that the query is pre-compiled by AnzoGraph. Pre-compiling a query reduces execution time when a user runs that query for the first time.
- Query Driven Templated Step: Enables users to create reusable query-driven templates for quickly creating additional query steps. Unlike the Templated Step, where users define each key-value pair, this step runs a query to identify all of the key-value pairs. Then the template query is run for each key-value solution from the first query.
- Query Step: Provides a SPARQL query template that you can use for writing a query that creates, cleans, conforms, or transforms data in the data layer.
- RDFS+ Inference Step: Uses RDFS and OWL rules to generate new data in a layer based on the vocabularies in the existing data.
- Templated Step: Enables users to create reusable templates for quickly creating additional query steps. The query in a Templated Step uses parameters to represent key-value pairs. When reusing the step, users modify the values for the keys rather than rewriting the query.
- Validation Step: Enables users to write a query that validates the data in a data layer and is a required component when setting up an execution condition.
- View: Enables users to write a SPARQL CONSTRUCT query that defines a view of the data but does not alter the source data or create new data unless you choose to materialize the view.
For more information about graphmarts, layers, and steps, see Working with Graphmarts.