Introduction to Data Layers

Data layers enhance graphmarts dynamically by loading additional data sets, inferring new data automatically, or running SPARQL queries to create, clean, conform, transform, or validate data. This topic introduces the fundamental concepts to know when working with data layers.

What is a Data Layer?

A data layer is a container for one or more steps. The steps in a layer perform the data loads or creation and transformation.

  • 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.

What is a Step?

The steps in a layer perform all of the data operations, such as loading a data set, creating new data, or transforming the existing data. 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. For more information, see Generating a Graph and Ontology with a Direct Load Step.
  • 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 information about creating steps, see Adding Steps to Data Layers.