build command
The build command is used to construct a new cube from its source file(s).
The source files must include a tidy-data.csv and optionally a cube-config.json. Refer to the qube-config guide for an overview of how to construct these files.
Syntax:
csvcubed build [OPTIONS] TIDY_CSV_PATH
Arguments:
Argument | Description |
---|---|
TIDY_CSV_PATH | The file path to the cube data file, formatted as tidy data CSV |
Options:
Option | Description |
---|---|
--help / -h | Show the command help text. |
--config / -c | The file path for the cube configuration json file. |
--out / -o | The output directory path where the build output is written. The default is './out' |
--ignore-validation-errors | Set this option to continue building the cube when errors are found. |
--validation-errors-to-file | Save validation errors to validation-errors.json in the output directory. |
--log-level | Set the desired logging level to one of 'crit', 'err', 'warn', 'info' and 'debug'. The default is 'warn' |
Configuration
--config
/ -c
To create a cube using a qube-config.json file, use the -c
option, e.g.
Saving Validation Errors
--validation-errors-to-file
Setting this flag will result in any validation errors being written to the validation-errors.json
file in the output directory. If no errors are encountered then the file is not written.
Log Level and Log File Location
Please refer to the Logging section for information on how to configure the log-level and the location of log files.
Output Directory
--out
/ -o
When the cube is built the default output path is ./out
. This may be changed by setting output option to an alternative path.
Build Command Errors
When errors are encountered, please refer to the errors guide for help on understanding and resolving them.
Examples
Building a cube without configuration
Building a cube without providing a qube-config.json
configuration file relies upon the configuration by convention approach.
To build a cube using only a CSV data file. For guidance on the correct data structure refer to the Shaping your data guide, the 'standard approach' is recommended as a good starting point.
Build Complete
Indicates that a cube was created and was written to the output directory (default: ./out
).
Building a cube from data and configuration file
This is referred to as the explicit configuration approach.
The cube config json file must adhere to the structures defined in the cube config schema.
For help on constructing the config json refer to the quick start guides on designing a CSV and linking data or the more detailed Configuration Guide
To build a cube using both configuration and data files the command is shown below.
Build Complete
Indicates that a cube was created and written to the default output directory (default: ./out
).