Building a CSV-W
This page is designed to help you build a CSV-W from a properly structured CSV file.
A transcribed video walkthrough
Prerequisites
This page assumes that you have already installed csvcubed and have designed your CSV input. We suggest you follow along with the example dataset. Save this file to your terminal's current working directory.
Building a CSV-W
To build a cube from the structured CSV we built in Designing a CSV, we run the csvcubed build command:
All being well we get the following output:
Build Complete @ [CSV-W output folder path]
This indicates that a cube was created and was written to the output directory (default: ./out
).
The Files
For our Eurovision example dataset we have the following files:
The key files are:
sweden_at_eurovision_no_missing.csv
- contains all of the observations.sweden_at_eurovision_no_missing.csv-metadata.json
- contains metadata describing the structure of your CSV-W cube.- For each dimension you will have:
<dimension_name>.csv
- a code list containing the unique values of that dimension.<dimension_name>.table.json
- schema describing the code list CSV.<dimension_name>.csv-metadata.json
- catalogue metadata describing the code list.
Passing configuration
So far in the quick start we have not touched on providing explicit configuring telling csvcubed how to convert your data into a CSV-W, but this is coming next. If you do wish to provide a configuration JSON file, you must set the --config
/ -c
option to tell csvcubed where the config file is.
Errors
There are a number of errors which can occur when building a CSV-W; most of them are designed to help ensure you get correct and valid outputs.
Please see our documentation explaining a number of common errors to see what you can do to diagnose and correct any errors which occur.
Next
The next step is to describe your CSV.