-
Notifications
You must be signed in to change notification settings - Fork 2
Import version 1 test dataset
Anusha Ranganathan edited this page Mar 20, 2019
·
6 revisions
- Git clone the nims-ngdr repo
- Copy the Sample dataset to /srv/ngdr/data/2018-11-19
This will be available at /data/data/2018-11-19 within the docker web container - Start bash in the web docker container
$ docker-compose exec web /bin/bash
- Start a rails console
bundle exec rails c
- Import the dataset
- Require the importer code and set the values for collections and log_file
NOTE At this point set collections = nil until support for collections is improvedimport_dir = '/data/data/2018-11-19/' require 'importers/dataset_importer' collections = nil log_file = 'data/import_dataset_log.csv'
- To run in debug mode
NOTE This will not import but produce the log file with the metadata attributesdebug = true d = Importers::DatasetImporter.new(import_dir, 'mandatory.xml', collections, debug, log_file) d.perform_create
- To import the datasets
NOTE This will import the datasets and produce the log file with the metadata attributes and errors, if anydebug = false d = Importers::DatasetImporter.new(import_dir, 'mandatory.xml', collections, debug, log_file) d.perform_create
- Require the importer code and set the values for collections and log_file