Skip to content

Trying to load a RDF graph into a Grax schema #23

Answered by marcelotto
carlotm asked this question in Q&A
Discussion options

You must be logged in to vote

You're actually trying to load the class instead of the resource described in your data.

The challenge here is that we can't see the actual node identifier when using Turtle's blank node description syntax ([ ]), which means there's no direct subject node reference we can use for loading. Here's how to handle this:

  1. Preferred approach: If you control the data, use proper URIs for your job postings instead of blank nodes.

  2. Solution for unknown blank nodes: To work with the current structure, you'll need to find the job posting nodes in your graph first:

alias Foo.Vocabs.SchemaOrg

graph
|> RDF.Graph.query({:job_posting_id?, RDF.type(), SchemaOrg.JobPosting})
|> Enum.map(fn %{job_postin…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by carlotm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants