Liking cljdoc? Tell your friends :D
Clojure only.

datahike-csv-loader.core


load-csvclj

(load-csv conn csv-file)
(load-csv conn csv-file col-schema)

Reads, parses, and loads data from CSV file named csv-file into the Datahike database pointed to by conn, with schema for the corresponding attributes optionally specified in map col-schema. Each column represents an attribute, with keywordized column name as attribute ident, or otherwise, an element in a heterogeneous or homogeneous tuple.

col-schema expects a set of attribute idents as the value of each key, except :ref and :tuple. Available options:

KeyDescription
: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
:refMap of :db/valueType :db.type/ref attribute idents to referenced attribute idents
:tupleMap of :db/valueType :db.type/tuple attribute idents to constituent attribute idents

Please see README for more detail.

Reads, parses, and loads data from CSV file named `csv-file` into the Datahike database pointed to
by `conn`, with schema for the corresponding attributes optionally specified in map `col-schema`.
Each column represents an attribute, with keywordized column name as attribute ident, or otherwise,
an element in a heterogeneous or homogeneous tuple.

`col-schema` expects a set of attribute idents as the value of each key, except `:ref` and `:tuple`.
Available options:

| 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` attribute idents to referenced attribute idents
| `:tuple`            | Map of `:db/valueType` `:db.type/tuple` attribute idents to constituent attribute idents

Please see README for more detail.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close