The following examples of shell commands illustrate the desired use of the gooddata
binary to be provided by this gem.
This file is intended to be renamed to README.md
in the future.
$ mkdir MyDataProject
$ cd MyDataProject/
$ gooddata configure-csv 'My Data Set' --file=/tmp/mydataset.csv
Setting up CSV connector to file /tmp/mydataset.csv
Guessing data types for mydataset.csv column:
id.......... connection point
name .... attribute
type....... attribute
impact.... attribute
created... date
closed.... date
value...... fact
Writing guessed columns into model/MyDataSet.xml
Done.
ATTENTION: Don't forget to review guessed data types and edit the model/MyDataSet.xml when necessary!
$ vim model/MyDataSet.xml <-- Note: would be nice to provide an option to open an editor automatically by the provious command
$ gooddata diff
_No remote project associated!
- MyDataSet.xml
+ id: connection point
+ name: attribute
...
+ value: fact_
$ gooddata create-remote 'My Data Project'
Creating remote project
Project hash wrtqwtbenhac36thgsdghhhjhjjsdfa stored in model/remote/main.pid
Creating data sets:
'My Data Set' using model/MyDataSet.xml
Populating data sets:
'My Data Set' from /tmp/mydataset.csv (incremental)
Done.
$ gooddata refresh
Comparing the remote and local data sets.
Populating data sets:
'My Data Set' from /tmp/mydataset.csv (incremental)
$ gooddata configure-csv 'My Data Set' --file=/tmp/mydataset_enriched.csv
'My Data Set' data set exists already, scanning for changes
Removed fields
impact
Guessing data types for new fields:
industry... attribute
score....... fact
Saving original version into model/bk/MyDataSet.xml.1
Writing guessed columns into model/MyDataSet.xml
Done.
ATTENTION: Don't forget to review guessed data types and edit the model/MyDataSet.xml when necessary!
$ gooddata refresh 'My Data Set'
_Comparing the remote and local data sets.
ERROR: We need to alter the structure of the server-side dataset. Consequently, we need to
fully reload the data. Since you are updating the 'My Data Set' data set in the incremental mode,
please use the --full-load switch to confirm your data file contains the full load. Alternatively, you
can specify an alternative data file using the --file parameter
Example: $ gooddata refresh 'My Data Set' --full --file=/tmp/full.csv_
$ gooddata refresh 'My Data Set' --full --file=/tmp/mydataset-full.csv
Comparing the remote and local data sets.
Generating remote model alteration script into
Populating data sets:
'My Data Set' from /tmp/mydataset.csv (incremental)
Done.
$