<https://docs.linkeddatahub.com/reference/imports/rdf/>
        a       <https://www.w3.org/ns/ldt/document-hierarchy#Item>;
        <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1>
                <https://docs.linkeddatahub.com/reference/imports/rdf/#content>;
        <http://purl.org/dc/terms/created>
                "2026-06-16T20:33:58.398Z"^^<http://www.w3.org/2001/XMLSchema#dateTime>;
        <http://purl.org/dc/terms/creator>
                <https://admin.linkeddatahub.com/acl/agents/0ab4a0f7-1ab0-4d0c-8efc-63a79a2e9a10/#this>;
        <http://purl.org/dc/terms/description>
                "RDF imports and transforming RDF using SPARQL CONSTRUCT";
        <http://purl.org/dc/terms/title>
                "RDF imports";
        <http://rdfs.org/sioc/ns#has_container>
                <https://docs.linkeddatahub.com/reference/imports/>;
        <http://www.w3.org/ns/auth/acl#owner>
                <https://admin.linkeddatahub.com/acl/agents/0ab4a0f7-1ab0-4d0c-8efc-63a79a2e9a10/#this> .

<https://docs.linkeddatahub.com/reference/imports/rdf/#content>
        a       <https://w3id.org/atomgraph/linkeddatahub#XHTML>;
        <http://www.w3.org/1999/02/22-rdf-syntax-ns#value>
                "<div xmlns=\"http://www.w3.org/1999/xhtml\">\n    <p class=\"lead\">RDF imports and transforming RDF using SPARQL CONSTRUCT</p>\n    <p>An RDF import is a combination of multiple resources:</p>\n    <dl>\n        <dt>File</dt>\n        <dd>The RDF file to be imported</dd>\n        <dt>Transformation query (optional)</dt>\n        <dd>A user-defined <code>CONSTRUCT</code> query that transforms the input RDF into another RDF</dd>\n        <dt>Graph (optional)</dt>\n        <dd>The target graph (document) to which converted items will be <a href=\"../../http-api/#ld-post\">POST</a>ed</dd>\n    </dl>\n    <p><em>Either the transformation query or the target graph needs to be specified, not both.</em></p>\n    <p>If the graph is specified, the resulting RDF data is appended to a single document.</p>\n    <p>If the transformation query is specified, the resulting data should contain document instances in order to attach to the <a href=\"../../dataset/#structure\">document hierarchy</a>. The documents have to be URI resources. The document graphs have to be <em>explicitly specified</em> using a <code>GRAPH</code> block in the <code>CONSTRUCT</code> template (which is a\n    <a href=\"https://jena.apache.org/documentation/query/construct-quad.html\" target=\"_blank\">Jena-specific extension</a> of SPARQL 1.1), otherwise the import result will end up in the default graph of the application's RDF dataset, which is not accessible via LinkedDataHub.</p>\n    <p>The import process runs asynchronously in the background, i.e. the import item is created before the process completes.\n        Currently the only way to determine when it completes is to refresh the import item and check the import\n        status (completed/failed). Upon successful report, metadata such as the number of imported RDF triples is attached\n        to the import.</p>\n    <p>The resulting RDF is split into documents (named graphs), which are then created one by one and validated against <a href=\"../../administration/ontologies/#constraints\">constraints</a> in the process.\n        Constraint violations, if any, are attached to the import item.</p>\n    <div>\n        <p>Lets assume we want to import SKOS concept data:</p>\n        <pre>@prefix : &lt;http://vocabularies.unesco.org/thesaurus/&gt; .\n@prefix skos: &lt;http://www.w3.org/2004/02/skos/core#&gt; .\n@prefix dcterms: &lt;http://purl.org/dc/terms/&gt; .\n@prefix xsd: &lt;http://www.w3.org/2001/XMLSchema#&gt; .\n\n:concept10 a skos:Concept ;\n    dcterms:modified \"2006-05-23T00:00:00\"^^xsd:dateTime ;\n    skos:inScheme &lt;http://vocabularies.unesco.org/thesaurus&gt; ;\n    skos:narrower :concept4938 , :concept7597 ;\n    skos:prefLabel \"Right to education\"@en , \"Droit à l'éducation\"@fr , \"Derecho a la educación\"@es , \"Право на образование\"@ru ;\n    skos:related :concept9 , :concept556 , :concept557 , :concept1519 , :concept5052 ;\n    skos:topConceptOf &lt;http://vocabularies.unesco.org/thesaurus&gt; .\n\n:concept1000 a skos:Concept ;\n    dcterms:modified \"2006-05-23T00:00:00\"^^xsd:dateTime ;\n    skos:broader :concept389 ;\n    skos:inScheme &lt;http://vocabularies.unesco.org/thesaurus&gt; ;\n    skos:prefLabel \"Talent\"@en , \"Talent\"@fr , \"Talento\"@es , \"Талант\"@ru ;\n    skos:related :concept993 , :concept996 , :concept3086 .\n\n:concept10003 a skos:Concept ;\n    dcterms:modified \"2006-05-23T00:00:00\"^^xsd:dateTime ;\n    skos:altLabel \"Entrevue\"@fr ;\n    skos:broader :concept4725 ;\n    skos:inScheme &lt;http://vocabularies.unesco.org/thesaurus&gt; ;\n    skos:prefLabel \"Interviews\"@en , \"Entretien\"@fr , \"Entrevista\"@es , \"Интервью\"@ru .</pre>\n        <div>\n            <h3 id=\"transformation\">Transformation</h3>\n            <p>This step is used to transform the RDF data that is being imported, if necessary (to a different vocabulary, for example). It also connects instances in the imported data to the documents in LinkedDataHub's <a href=\"../../dataset/\" target=\"_blank\">dataset</a>.</p>\n            <p>The mapping is a user-defined SPARQL <code>CONSTRUCT</code>. These are the rules that hold for mapping queries:</p>\n            <ul>\n                <li><code>BASE</code> value is automatically set to the imported file's URI. Do not add an explicit <code>BASE</code> to the query.</li>\n                <li><code>$base</code> binding is set to the value of the application's baseURI</li>\n                <li>use<code>OPTIONAL</code> for optional values</li>\n                <li>use <code>BIND()</code> to introduce new values and/or cast literals to the appropriate result datatype or URI</li>\n                <li>when building document URIs, use natural IDs from the input data (or UUIDs if there are no IDs) and remember to URI-encode them using <code>encode_for_uri</code></li>\n                <li>use a <code>GRAPH</code> block in the constructor template to construct triples for a specific document</li>\n                <li>construct <dfn>dh:Container</dfn> instances to create new container documents or <dfn>dh:Item</dfn> instances to create new item documents. <code>dct:title</code> values are mandatory for documents.</li>\n                <li>if you're constructing non-information resource (e.g. thing, concept) descriptions, assign them URIs with fragment identified (e.g. <samp>#this</samp>) and pair them with item documents using the <code>foaf:primaryTopic</code> property</li>\n            </ul>\n            <p>We plan to provide a UI-based mapping tool in the future.</p>\n            <div>\n                <h4 id=\"transformation-example\">Example</h4>\n                <p>In this example we pair each SKOS concept from the imported dataset with a new document:</p>\n                <pre><code>PREFIX dh:    &lt;https://www.w3.org/ns/ldt/document-hierarchy#&gt;\nPREFIX sioc:  &lt;http://rdfs.org/sioc/ns#&gt;\nPREFIX foaf:  &lt;http://xmlns.com/foaf/0.1/&gt;\nPREFIX skos:  &lt;http://www.w3.org/2004/02/skos/core#&gt;\nPREFIX dct:   &lt;http://purl.org/dc/terms/&gt;\n\nCONSTRUCT\n{\n    GRAPH ?item\n    {\n        ?concept ?p ?o .\n\n        ?item a dh:Item ;\n            foaf:primaryTopic ?concept ;\n            sioc:has_container ?container ;\n            dh:slug ?id ;\n            dct:title ?prefLabel .\n    }\n}\nWHERE\n{\n    SELECT *\n    {\n        ?concept a skos:Concept .\n        BIND (STRAFTER(STR(?concept), \"http://vocabularies.unesco.org/thesaurus/\") AS ?id)\n        BIND (uri(concat(str($base), \"concepts/\")) AS ?container)\n        BIND (uri(concat(str(?container), encode_for_uri(?id), \"/\")) AS ?item)\n\n        ?concept ?p ?o\n        OPTIONAL\n        {\n            ?concept skos:prefLabel ?prefLabel\n            FILTER (langMatches(lang(?prefLabel), \"en\"))\n        }\n    }\n}</code></pre>\n                <p>When the import is complete, you should be able to see the imported documents as children of the <samp>${base}concepts/</samp> container.</p>\n                <p>The result of our mapping:</p>\n                <pre>@prefix : &lt;http://vocabularies.unesco.org/thesaurus/&gt; .\n@prefix skos: &lt;http://www.w3.org/2004/02/skos/core#&gt; .\n@prefix dcterms: &lt;http://purl.org/dc/terms/&gt; .\n@prefix xsd: &lt;http://www.w3.org/2001/XMLSchema#&gt; .\n@prefix foaf: &lt;http://xmlns.com/foaf/0.1/&gt; .\n@prefix sioc: &lt;http://rdfs.org/sioc/ns#&gt; .\n@prefix dh: &lt;https://www.w3.org/ns/ldt/document-hierarchy#&gt; .\n\n:concept10 a skos:Concept ;\n    dcterms:modified \"2006-05-23T00:00:00\"^^xsd:dateTime ;\n    skos:inScheme &lt;http://vocabularies.unesco.org/thesaurus&gt; ;\n    skos:narrower :concept4938 , :concept7597 ;\n    skos:prefLabel \"Right to education\"@en , \"Droit à l'éducation\"@fr , \"Derecho a la educación\"@es , \"Право на образование\"@ru ;\n    skos:related :concept9 , :concept556 , :concept557 , :concept1519 , :concept5052 ;\n    skos:topConceptOf &lt;http://vocabularies.unesco.org/thesaurus&gt; .\n\n&lt;concepts/c499e66a-8036-4637-929d-0d809177883e/&gt; a dh:Item ;\n    sioc:has_container &lt;concepts/&gt; ;\n    dh:slug \"c499e66a-8036-4637-929d-0d809177883e\" ;\n    dcterms:title \"Right to education\"@en ;\n    foaf:primaryTopic :concept10 .\n\n:concept1000 a skos:Concept ;\n    dcterms:modified \"2006-05-23T00:00:00\"^^xsd:dateTime ;\n    skos:broader :concept389 ;\n    skos:inScheme &lt;http://vocabularies.unesco.org/thesaurus&gt; ;\n    skos:prefLabel \"Talent\"@en , \"Talent\"@fr , \"Talento\"@es , \"Талант\"@ru ;\n    skos:related :concept993 , :concept996 , :concept3086 .\n\n&lt;concepts/f41910fa-9077-4656-8f73-752fd923a79b/&gt; a dh:Item ;\n    sioc:has_container &lt;concepts/&gt; ;\n    dh:slug \"f41910fa-9077-4656-8f73-752fd923a79b\" ;\n    dcterms:title \"Talent\"@en ;\n    foaf:primaryTopic :concept1000 .\n\n:concept10003 a skos:Concept ;\n    dcterms:modified \"2006-05-23T00:00:00\"^^xsd:dateTime ;\n    skos:altLabel \"Entrevue\"@fr ;\n    skos:broader :concept4725 ;\n    skos:inScheme &lt;http://vocabularies.unesco.org/thesaurus&gt; ;\n    skos:prefLabel \"Interviews\"@en , \"Entretien\"@fr , \"Entrevista\"@es , \"Интервью\"@ru .\n\n&lt;concepts/2afb2e06-5081-4db1-9255-660fcd1b3ec8/&gt; a dh:Item ;\n    sioc:has_container &lt;concepts/&gt; ;\n    dh:slug \"2afb2e06-5081-4db1-9255-660fcd1b3ec8\" ;\n    dcterms:title \"Interviews\"@en ;\n    foaf:primaryTopic :concept10003 .</pre>\n            </div>\n        </div>\n    </div>\n    <p class=\"lead\">If you are ready to import some RDF, see our step-by-step tutorial on <a href=\"../../../user-guide/import-data/import-rdf-data/\">creating an RDF import</a>.</p>\n</div>"^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral>;
        <http://www.w3.org/2000/01/rdf-schema#seeAlso>
                <https://www.w3.org/TR/sparql11-query/#construct> .

<https://www.w3.org/TR/sparql11-query/#construct>
        <http://purl.org/dc/terms/title>
                "SPARQL 1.1 Query Language: CONSTRUCT" .
