project variable Command Group¤
List, create, delete or get data from project variables.
Project variables can be used in dataset and task parameters, and in the template transform operator. Variables are either based on a static value or based on a template. They may use templates that access globally configured variables or other preceding variables from the same project.
Variables are identified by a VARIABLE_ID. To get a list of existing variables, execute the list command or use tab-completion. The VARIABLE_ID is a concatenation of a PROJECT_ID and a VARIABLE_NAME, such as my-project:my-variable.
project variable list¤
List available project variables.
Outputs a table or a list of project variables.
Options
--raw                    Outputs raw JSON.
--id-only                Lists only variables names and no other metadata.
                         This is useful for piping the IDs into other
                         commands.
--filter <TEXT TEXT>...  Filter variables based on metadata. First parameter
                         CHOICE can be one of ['project', 'regex']. The
                         second parameter is based on CHOICE, e.g. a project
                         ID or a regular expression string.
project variable get¤
Get the value or other data of a project variable.
Use the --key option to specify which information you want to get.
Note
Only the value key is always available on a project variable. Static value variables have no template key, and the description key is optional for both types of variables.
Options
project variable delete¤
Delete a project variable.
Note
You can not delete a variable which is used by another (template based) variable. In order to do so, delete the template based variable first.
project variable create¤
Create a new project variable.
Variables need to be created with a value or a template (not both). In addition to that, a project ID and a name are mandatory.
Note
cmemc is currently not able to manage the order of the variables in a project. This means you have to create plain value variables in advance, before you can create template based variables, which access these values.
Options
--value TEXT        The value of the new project variable.
--template TEXT     The template of the new project variable. You can use
                    Jinja template syntax, e.g. use '{{global.myVar}}' for
                    accessing global variables, or '{{project.myVar}}' for
                    accessing variables from the same project.
--description TEXT  The optional description of the new project variable.
--project TEXT      The project, where you want to create the variable in.
                    If there is only one project in the workspace, this
                    option can be omitted.
project variable update¤
Update data of an existing project variable.
With this command you can update the value or the template, as well as the description of a project variable.
Note
If you update the template of a static variable, it will be transformed to a template based variable. If you want to change the value of a template based variable, an error will be shown.
Options
--value TEXT        The new value of the project variable.
--template TEXT     The new template of the project variable. You can use
                    Jinja template syntax, e.g. use '{{global.myVar}}' for
                    accessing global variables, or '{{project.myVar}}' for
                    accessing variables from the same project.
--description TEXT  The new description of the project variable.