(load-csv conn csv-file cols-cfg)
Reads, parses, and loads data from CSV file named csv-file
into a Datahike database via conn
,
as specified in options map cols-cfg
.
cols-cfg
expects a set of attribute idents as the value of each key, except :ref
and :tuple
.
Available options are:
| Key | Description |
|---------------------|---------------|
| :unique-id
| :db/unique
value :db.unique/identity
| :unique-val
| :db/unique
value :db.unique/value
| :index
| :db/index
value true
| :cardinality-many
| :db/cardinality
value :db.cardinality/many
| :ref
| Map of :db/valueType
:db.type/ref
attributes to referenced attribute idents
| :tuple
| Map of :db/valueType
:db.type/tuple
attributes to constituent column names (keywordized)
Reads, parses, and loads data from CSV file named `csv-file` into a Datahike database via `conn`, as specified in options map `cols-cfg`. `cols-cfg` expects a set of attribute idents as the value of each key, except `:ref` and `:tuple`. Available options are: | Key | Description | |---------------------|---------------| | `:unique-id` | `:db/unique` value `:db.unique/identity` | `:unique-val` | `:db/unique` value `:db.unique/value` | `:index` | `:db/index` value `true` | `:cardinality-many` | `:db/cardinality` value `:db.cardinality/many` | `:ref` | Map of `:db/valueType` `:db.type/ref` attributes to referenced attribute idents | `:tuple` | Map of `:db/valueType` `:db.type/tuple` attributes to constituent column names (keywordized)
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close