Cubes workspace configuration is stored in a .ini file with sections:
The configuration has changed. Since Cubes supports multiple data stores, their type (backend) is specifien in the datastore configuration as type property, for example type=sql.
Simple configuration might look like this:
[workspace] model: model.json [datastore] type: sql url: postgresql://localhost/database
stores – path to a file containing store descriptions – every section is a store with same name as the section
models_path – path to a directory containing models. If this is set to non-empty value, then all model paths specified in [models] are prefixed with this path
log - path to a log file
warn, info, debug
timezone - name of default time zone. Used in date and time operations, such as named relative time.
first_weekday – name of first day of the week. It can also be a number where 0 is Monday, 6 is Sunday
authorization – authorization method to be used
Section [models] contains list of models. The property names are model identifiers within the configuration (see [translations] for example) and the values are paths to model files.
[models] main: model.json mixpanel: mixpanel.json
If root models_path is specified in [workspace] then the relative model paths are combined with the root. Example:
[workspace] models_path: /dwh/cubes/models [models] main: model.json events: events.json
The models are loaded from /dwh/cubes/models/model.json and /dwh/cubes/models/events.json.
output with iterable objects, such as facts. Default is 1000. It is recommended to use alternate response format, such as CSV, to get more records.
run by the slicer command)
true for demonstration purposes.
host - host where the server runs, defaults to localhost
port - port on which the server listens, defaults to 5000
authentication – authentication method (see below for more information)
pid_file – path to a file where PID of the running server will be written. If not provided, no PID file is created.
This section is depreciated. Use model in [workspace] for single model file or [models] for multiple models.
path - path to model .json file
Currently this variable is optional and it is used only by experimental sphinx search backend.
There might be one or more datastores configured. The section [datastore] of the cubes.ini file describes the default store. Multiple stores are configured in a separate stores.ini file. The path to the stores configuration file might be specified in a variable stores of the [workspace] section
The store configuration has to have at least one property: type. Rest of the properties are handled by the actual data store.
Example configuration file:
[workspace] model: ~/models/contracts_model.json [server] reload: yes log: /var/log/cubes.log log_level: info [datastore] type: sql url: postgresql://localhost/data schema: cubes