<https://docs.linkeddatahub.com/reference/imports/csv/>
        a       <https://w3id.org/atomgraph/linkeddatahub/document-hierarchy#Item>;
        <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1>
                <https://docs.linkeddatahub.com/reference/imports/csv/#content>;
        <http://purl.org/dc/terms/created>
                "2026-09-29T09:52:39.258Z"^^<http://www.w3.org/2001/XMLSchema#dateTime>;
        <http://purl.org/dc/terms/creator>
                <https://admin.linkeddatahub.com/acl/agents/5ba81960-d511-4a3b-8b9a-cb5bb278dd95/#this>;
        <http://purl.org/dc/terms/description>
                "CSV imports and mapping to RDF using SPARQL CONSTRUCT";
        <http://purl.org/dc/terms/title>
                "CSV 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/5ba81960-d511-4a3b-8b9a-cb5bb278dd95/#this> .

<https://www.w3.org/TR/2015/REC-csv2rdf-20151217/>
        <http://purl.org/dc/terms/title>
                "Generating RDF from Tabular Data on the Web" .

<https://docs.linkeddatahub.com/reference/imports/csv/#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=\"ldh-body-lg\">CSV imports and mapping to RDF using SPARQL CONSTRUCT</p>\n    <p><a href=\"https://en.wikipedia.org/wiki/Comma-separated_values\" target=\"_blank\">CSV</a> is a plain-text format for\n        tabular data.</p>\n    <div class=\"ac-alert va-informative\" role=\"status\">\n        <span class=\"ac-alert-ic\"><span aria-hidden=\"true\" class=\"msi outline\">info</span></span>\n        <div class=\"ac-alert-body\">\n            <p class=\"ac-alert-text\">Read the shared <a href=\"../#mapping-queries\">mapping query rules</a> first — they apply to CSV and RDF imports alike.</p>\n        </div>\n    </div>\n    <p>A CSV import is a combination of multiple resources:</p>\n    <dl>\n        <dt>File</dt>\n        <dd>The CSV file to be mapped to RDF and imported (<code>ldh:file</code>)</dd>\n        <dt>Mapping query</dt>\n        <dd>A user-defined <code>CONSTRUCT</code> query that produces RDF (<code>spin:query</code>)</dd>\n        <dt>Delimiter</dt>\n        <dd>The single-character column separator (<code>ldh:delimiter</code>). The CLI defaults it to <samp>,</samp></dd>\n    </dl>\n    <p>A CSV import in LinkedDataHub has two steps:</p>\n    <ol>\n        <li>\n            <a href=\"#generic-conversion\">generic conversion</a> creates an intermediary, generic CSV/RDF representation for each CSV row\n        </li>\n        <li>\n            <a href=\"#vocabulary-conversion\">vocabulary conversion</a> maps the CSV/RDF to the final RDF representation using the mapping query\n        </li>\n    </ol>\n    <p>Imports run in the background — see <a href=\"../#execution\">import execution</a>.</p>\n    <p>The mapping is done <em>one row at a time</em>, with each row resulting in a newly created document, which must be attached to the <a href=\"../../dataset/#structure\">document hierarchy</a>. The documents have to be URI resources. The server will automatically assign URIs to the documents constructed in the default graph. Alternatively, it is possible to explicitly specify the document graph 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).</p>\n    <p>The resulting RDF data is validated against <a href=\"../../administration/ontologies/#constraints\">constraints</a> as it is created. Constraint violations, if any, are attached to the import item.</p>\n    <p>The running example in the following sections is the Northwind Traders category data, exactly as the\n        <a href=\"../../../tutorial/data/\">tutorial</a> and the demo app import it:</p>\n    <pre>categoryID,categoryName,description,pictureHash\n1,Beverages,Soft drinks coffees teas beers and ales,ec56b79671b30ecb98316d9b766fba198286b3b6\n2,Condiments,Sweet and savory sauces relishes spreads and seasonings,7e9f535a3bf693ec856702856fffd3be5a3df4f1\n3,Confections,Desserts candies and sweet breads,e781b6c8e83be3f23aa241416f92447a66dc35e4</pre>\n    <p class=\"exhibit-links\">Source: <a href=\"https://github.com/AtomGraph/LinkedDataHub-Apps/blob/master/demo/northwind-traders/categories/categories.csv\" target=\"_blank\">categories/categories.csv</a></p>\n    <p>An import itself is described in RDF, pairing the uploaded file with the mapping query:</p>\n    <pre>&lt;#categories-import&gt; a ldh:CSVImport ;\n    dct:title \"Categories\" ;\n    spin:query &lt;#categories-query&gt; ;\n    ldh:file &lt;https://localhost:4443/uploads/58ee67ce53cfb3ad73368eda24a089314bb0bf41&gt; ;\n    ldh:delimiter \",\" .</pre>\n    <div>\n        <h2 id=\"generic-conversion\">Generic conversion</h2>\n        <p>The data table is converted to a graph by treating rows as resources, columns as predicates, and\n            cells as <code>xsd:string</code> literals. The approach is the same as CSV on the Web\n            <a href=\"https://www.w3.org/TR/2015/REC-csv2rdf-20151217/#dfn-minimal-mode\" target=\"_blank\">minimal mode</a>.</p>\n        <pre>@base &lt;https://localhost:4443/&gt; .\n\n_:8228a149-8efe-448d-b15f-8abf92e7bd17\n    &lt;#categoryID&gt; \"1\" ;\n    &lt;#categoryName&gt; \"Beverages\" ;\n    &lt;#description&gt; \"Soft drinks coffees teas beers and ales\" ;\n    &lt;#pictureHash&gt; \"ec56b79671b30ecb98316d9b766fba198286b3b6\" .\n\n_:ec59dcfc-872a-4144-822b-9ad5e2c6149c\n    &lt;#categoryID&gt; \"2\" ;\n    &lt;#categoryName&gt; \"Condiments\" ;\n    &lt;#description&gt; \"Sweet and savory sauces relishes spreads and seasonings\" ;\n    &lt;#pictureHash&gt; \"7e9f535a3bf693ec856702856fffd3be5a3df4f1\" .\n\n_:e8f2e8e9-3d02-4bf5-b4f1-4794ba5b52c9\n    &lt;#categoryID&gt; \"3\" ;\n    &lt;#categoryName&gt; \"Confections\" ;\n    &lt;#description&gt; \"Desserts candies and sweet breads\" ;\n    &lt;#pictureHash&gt; \"e781b6c8e83be3f23aa241416f92447a66dc35e4\" .</pre>\n    </div>\n    <div>\n        <h2 id=\"vocabulary-conversion\">Vocabulary conversion</h2>\n        <p>This step provides a semantic lift for the generic RDF output of the previous step by mapping it\n            to classes and properties from specific vocabularies. It also connects instances in the imported data to the documents in LinkedDataHub's <a href=\"../../dataset/\">dataset</a>.</p>\n        <p>The mapping is a user-defined SPARQL <code>CONSTRUCT</code> that follows the shared <a href=\"../#mapping-queries\">mapping query rules</a>.</p>\n        <div>\n            <h3 id=\"vocabulary-conversion-example\">Example</h3>\n            <p>The demo's category mapping constructs a <code>schema:ProductGroup</code> per row and mints each row its own document with a\n                <code>GRAPH</code> block:</p>\n            <pre>PREFIX foaf:       &lt;http://xmlns.com/foaf/0.1/&gt;\nPREFIX dct:        &lt;http://purl.org/dc/terms/&gt;\nPREFIX schema:     &lt;https://schema.org/&gt;\n\nCONSTRUCT\n{\n    GRAPH ?graph\n    {\n        ?graph dct:title ?categoryName ;\n            foaf:primaryTopic ?category .\n\n        ?category a schema:ProductGroup ;\n            dct:title ?categoryName ;\n            dct:description ?description ;\n            schema:name ?categoryName ;\n            schema:identifier ?categoryID ;\n            schema:description ?description ;\n            foaf:depiction ?picture .\n    }\n}\nWHERE\n{\n    ?category_row &lt;#categoryID&gt; ?categoryID ;\n        &lt;#description&gt; ?description ;\n        &lt;#categoryName&gt; ?categoryName ;\n        &lt;#pictureHash&gt; ?pictureHash .\n\n    BIND(uri(concat(str($base), \"categories/\")) AS ?container)\n    BIND(uri(concat(str(?container), encode_for_uri(?categoryID), \"/\")) AS ?graph)\n    BIND(uri(concat(str(?graph), \"#this\")) AS ?category)\n    BIND(uri(concat(str($base), \"uploads/\", encode_for_uri(?pictureHash))) AS ?picture)\n}</pre>\n            <p class=\"exhibit-links\">Source: <a href=\"https://github.com/AtomGraph/LinkedDataHub-Apps/blob/master/demo/northwind-traders/categories/categories.rq\" target=\"_blank\">categories/categories.rq</a></p>\n            <p>(A mapping can also construct <code>dh:Item</code> resources in the default graph and let the server assign the document URIs,\n                as described above — the <code>GRAPH</code> form gives the import full control over the URIs instead.)</p>\n            <p>When the import is complete, the imported documents appear as children of the <samp>{base}categories/</samp> container.\n                The Beverages row becomes:</p>\n            <pre>PREFIX  dct:  &lt;http://purl.org/dc/terms/&gt;\nPREFIX  foaf: &lt;http://xmlns.com/foaf/0.1/&gt;\nPREFIX  schema: &lt;https://schema.org/&gt;\n\n&lt;https://localhost:4443/categories/1/&gt;\n    dct:title \"Beverages\" ;\n    foaf:primaryTopic &lt;https://localhost:4443/categories/1/#this&gt; .\n\n&lt;https://localhost:4443/categories/1/#this&gt; a schema:ProductGroup ;\n    dct:title \"Beverages\" ;\n    dct:description \"Soft drinks coffees teas beers and ales\" ;\n    schema:name \"Beverages\" ;\n    schema:identifier \"1\" ;\n    schema:description \"Soft drinks coffees teas beers and ales\" ;\n    foaf:depiction &lt;https://localhost:4443/uploads/ec56b79671b30ecb98316d9b766fba198286b3b6&gt; .</pre>\n            <p class=\"exhibit-links\">Live: <a href=\"https://northwind-traders.demo.linkeddatahub.com/categories/1/\" target=\"_blank\">/categories/1/</a></p>\n        </div>\n    </div>\n    <div>\n        <h2 id=\"management\">Management</h2>\n        <table>\n            <caption class=\"ac-vh\">CSV import actions and their CLI commands</caption>\n            <thead>\n                <tr>\n                    <th scope=\"col\">Action</th>\n                    <th scope=\"col\">CLI command</th>\n                </tr>\n            </thead>\n            <tbody>\n                <tr>\n                    <th scope=\"row\">Create CSV import from an uploaded file and a query (<samp>--file</samp>, <samp>--query</samp>, <samp>--delimiter</samp>)</th>\n                    <td><a href=\"../../command-line-interface/#commands\"><samp>ldh add csv-import</samp></a></td>\n                </tr>\n                <tr>\n                    <th scope=\"row\">Import a local CSV file end-to-end (<samp>--csv-file</samp>, <samp>--query-file</samp>, <samp>--delimiter</samp>)</th>\n                    <td><a href=\"../../command-line-interface/#commands\"><samp>ldh import csv</samp></a></td>\n                </tr>\n            </tbody>\n        </table>\n    </div>\n    <p class=\"ldh-body-lg\">If you are ready to import some CSV, follow the user guide on <a href=\"../../../user-guide/import-data/import-csv-data/\">creating a CSV 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/2015/REC-csv2rdf-20151217/> .

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