SMS defaults for CSV import?

I'd like to import some data from CSV files. I read through the doc on CSV import (Home | Stardog Documentation Latest) and the supported mapping formats (Home | Stardog Documentation Latest).

The doc for the SMS format is pretty scant (Home | Stardog Documentation Latest) unless I'm missing the link for some spec for that syntax.

So my question is whether there is some default that automatically (i.e., without manually writing mappings) maps whatever columns are found in the CSV to properties of the same name and with reasonable default data types (either by way of inspection of the data or even just defaulting to string)?

Or is it necessary to explicitly provide property mappings for every column in each CSV?

Thank you!

Stardog will use a default mapping if you omit the mapping file. There’s a small paragraph on it in the docs at the end of the section titled “using virtual graphs“

Thanks Zachary. I see the statement:

A mapping file is not required if your data has a built-in schema, e.g. MySQL or other relational databases.

but I don't believe that applies to CSV data. I will keep experimenting. Thanks for the assist.

I wasn't sure either. It's part of the R2RML mapping spec for relational sources so you can always import your CSV into a database and then do a default import from there. I know that defeats the purpose of a quick and easy import. I've usually found that when you expect something to work because it makes sense that it would Stardog would do it. I can imaging it might depend on having a header in the csv file but that's just a guess.

If you're looking into default mappings with CSV files you might want to look into the W3C work on CSVW.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.