cmr.graph.data.import
Functions for importing data into neo4j.
collection->row
(collection->row collection)
Returns a row to write to the collections CSV file for a given collection.
collection-columns
Columns in the collections CSV file.
collection-csv-file
Documentation forthcoming
collection-data-center-csv-file
Documentation forthcoming
collection-tag-csv-file
Documentation forthcoming
collection-url-csv-file
Documentation forthcoming
construct-collection-data-center-row
(construct-collection-data-center-row collection data-center)
Creates a collection data center row for a relationship CSV file.
construct-collection-url-row
(construct-collection-url-row collection url)
Creates a collection URL row for a relationship CSV file.
import-all-data
(import-all-data conn)
Imports all of the collection data.
import-statements
All of the import statements to run to populate a completely empty database. Make sure to delete everything before running.
json-collections-filename
Documentation forthcoming
md5-leo
(md5-leo value)
When a hash just isn’t good enough.
parse-url-into-nodes
(parse-url-into-nodes url)
Parses a single URL field into all the nodes we want to create for the URL.
prepare-collection-for-import
(prepare-collection-for-import collection)
Returns only the relevant JSON fields from the provided collection record for import into neo4j.
read-json-file
(read-json-file filename)
Reads a JSON file into memory
relevant-fields
List of fields to parse from a collection record.
test-file
Documentation forthcoming
url-fields
List of fields we are interested in parsing from a given URL.
write-collection-csv
(write-collection-csv collections output-filename)
Creates the collection csv file
write-collection-data-center-relationship-csv
(write-collection-data-center-relationship-csv collections output-filename)
Creates the collection<->data centers relationship csv file.
write-collection-tags-relationship-csv
(write-collection-tags-relationship-csv collections output-filename)
Creates the collection<->tag relationship csv file.
write-collection-url-relationship-csv
(write-collection-url-relationship-csv collections output-filename)
Creates the collection<->url relationship csv file.