Load Data into Dgraph
Explore how to load a book graph into Dgraph using RDF mutation format and perform queries with GraphQL and DQL. Discover how to filter data on edge properties or facets effectively using the @facets directive to extract specific information such as books with second authors.
We'll cover the following...
We'll cover the following...
Book graph
We’ll now load some data. We’ll use our standard books graph, which is expressed in Dgraph’s RDF mutation format:
import GraphCommons
import RDFGraph
import RDF.Sigils
alias RDFGraph.Vocab.{DC, BIBO, DCTERMS, EVENT, FOAF, PRISM, SCHEMA, STATUS}
import GraphCommons.Utils ; alias GraphCommons.Utils
rdf_store :local
Book graph in Dgraph’s RDF mutation format
Note that a fourth term is present in the mutation format for facets, as highlighted. Let's load this ...