dataset¶
dataset list¶
List of datasets
jexia dataset list
[-f {csv,json,table,value,yaml}]
[-c COLUMN]
[--quote {all,minimal,none,nonnumeric}]
[--noindent]
[--max-width <integer>]
[--fit-width]
[--print-empty]
[--sort-column SORT_COLUMN]
--project PROJECT_ID
-
-f
<FORMATTER>
,
--format
<FORMATTER>
¶ the output format, defaults to table
-
-c
COLUMN
,
--column
COLUMN
¶ specify the column(s) to include, can be repeated to show multiple columns
-
--quote
<QUOTE_MODE>
¶ when to include quotes, defaults to nonnumeric
-
--noindent
¶
whether to disable indenting the JSON
-
--max-width
<integer>
¶ Maximum display width, <1 to disable. You can also use the CLIFF_MAX_TERM_WIDTH environment variable, but the parameter takes precedence.
-
--fit-width
¶
Fit the table to the display width. Implied if –max-width greater than 0. Set the environment variable CLIFF_FIT_WIDTH=1 to always enable
-
--print-empty
¶
Print empty table if there is no data to show.
-
--sort-column
SORT_COLUMN
¶ specify the column(s) to sort the data (columns specified first have a priority, non-existing columns are ignored), can be repeated
-
--project
PROJECT_ID
¶ Projects ID
dataset create¶
Create new dataset
jexia dataset create
[-f {json,shell,table,value,yaml}]
[-c COLUMN]
[--noindent]
[--prefix PREFIX]
[--max-width <integer>]
[--fit-width]
[--print-empty]
--project PROJECT_ID
--name NAME
-
-f
<FORMATTER>
,
--format
<FORMATTER>
¶ the output format, defaults to table
-
-c
COLUMN
,
--column
COLUMN
¶ specify the column(s) to include, can be repeated to show multiple columns
-
--noindent
¶
whether to disable indenting the JSON
-
--prefix
<PREFIX>
¶ add a prefix to all variable names
-
--max-width
<integer>
¶ Maximum display width, <1 to disable. You can also use the CLIFF_MAX_TERM_WIDTH environment variable, but the parameter takes precedence.
-
--fit-width
¶
Fit the table to the display width. Implied if –max-width greater than 0. Set the environment variable CLIFF_FIT_WIDTH=1 to always enable
-
--print-empty
¶
Print empty table if there is no data to show.
-
--project
PROJECT_ID
¶ Projects ID
-
--name
NAME
¶ Dataset’s name
dataset delete¶
Delete dataset
jexia dataset delete --project PROJECT_ID DATASET_ID
-
--project
PROJECT_ID
¶ Projects ID
-
DATASET_ID
¶
UUID of dataset which should be deleted
dataset field list¶
Show fields of dataset
jexia dataset field list
[-f {csv,json,table,value,yaml}]
[-c COLUMN]
[--quote {all,minimal,none,nonnumeric}]
[--noindent]
[--max-width <integer>]
[--fit-width]
[--print-empty]
[--sort-column SORT_COLUMN]
--project PROJECT_ID
--dataset DATASET_ID
-
-f
<FORMATTER>
,
--format
<FORMATTER>
¶ the output format, defaults to table
-
-c
COLUMN
,
--column
COLUMN
¶ specify the column(s) to include, can be repeated to show multiple columns
-
--quote
<QUOTE_MODE>
¶ when to include quotes, defaults to nonnumeric
-
--noindent
¶
whether to disable indenting the JSON
-
--max-width
<integer>
¶ Maximum display width, <1 to disable. You can also use the CLIFF_MAX_TERM_WIDTH environment variable, but the parameter takes precedence.
-
--fit-width
¶
Fit the table to the display width. Implied if –max-width greater than 0. Set the environment variable CLIFF_FIT_WIDTH=1 to always enable
-
--print-empty
¶
Print empty table if there is no data to show.
-
--sort-column
SORT_COLUMN
¶ specify the column(s) to sort the data (columns specified first have a priority, non-existing columns are ignored), can be repeated
-
--project
PROJECT_ID
¶ Projects ID
-
--dataset
DATASET_ID
¶ Dataset’s ID
dataset field create¶
Create new field in dataset.
jexia dataset field create
[-f {json,shell,table,value,yaml}]
[-c COLUMN]
[--noindent]
[--prefix PREFIX]
[--max-width <integer>]
[--fit-width]
[--print-empty]
--project PROJECT_ID
--dataset DATASET_ID
--name NAME
--type TYPE
[--constraint TYPE=VALUE]
-
-f
<FORMATTER>
,
--format
<FORMATTER>
¶ the output format, defaults to table
-
-c
COLUMN
,
--column
COLUMN
¶ specify the column(s) to include, can be repeated to show multiple columns
-
--noindent
¶
whether to disable indenting the JSON
-
--prefix
<PREFIX>
¶ add a prefix to all variable names
-
--max-width
<integer>
¶ Maximum display width, <1 to disable. You can also use the CLIFF_MAX_TERM_WIDTH environment variable, but the parameter takes precedence.
-
--fit-width
¶
Fit the table to the display width. Implied if –max-width greater than 0. Set the environment variable CLIFF_FIT_WIDTH=1 to always enable
-
--print-empty
¶
Print empty table if there is no data to show.
-
--project
PROJECT_ID
¶ Projects ID
-
--dataset
DATASET_ID
¶ Dataset’s ID
-
--name
NAME
¶ Field’s name
-
--type
TYPE
¶ Field’s type
-
--constraint
TYPE=VALUE
¶ Field’s constraints, repeatable option (see documentationto get more information). This is repeatable option.
- Allowed constraints for all of types:
default (string) - default value
required (true/false) - required field
- Allowed constraints for integer/float fields:
max_value (integer/float) - maximum value
min_value (integer/float) - minimum value
- Allowed constraints for string fields:
lowercase (true/false) - field can only contain lowercase values
uppercase (true/false) - field can only contain uppercase values
alphanumeric (true/false) - field can only contain alpha-numeric values
regexp (regex expression) - field can only contain value matched to the regex expression
alpha (true/false) - field can only contain letters
numeric (true/false) - field can only contain numbers
min_length (integer) - minimum length of string
max_length (integer) - maximum length of string
Example of usage:
$ jexia dataset field create --project=8ae43645-2dfb-45c7-a7bd-991dde8b775a --dataset=825cbad3-f5b7-4d4c-a65e-07d3b5002929 --type=string --name=test-field --constraint required=true --constraint default=some-value --constraint regexp='.*'
+-------------+----------------------------------------------+
| Field | Value |
+-------------+----------------------------------------------+
| id | 8e151f87-eab7-4284-88d8-a2b51157a7a4 |
| name | test-field |
| type | string |
| immutable | False |
| properties | {} |
| constraints | required=True, default=some-value, regexp=.* |
+-------------+----------------------------------------------+
dataset field update¶
Update the field’s constraints in dataset.
jexia dataset field update
[-f {json,shell,table,value,yaml}]
[-c COLUMN]
[--noindent]
[--prefix PREFIX]
[--max-width <integer>]
[--fit-width]
[--print-empty]
--project PROJECT_ID
--dataset DATASET_ID
[--constraint TYPE=VALUE]
FIELD_ID
-
-f
<FORMATTER>
,
--format
<FORMATTER>
¶ the output format, defaults to table
-
-c
COLUMN
,
--column
COLUMN
¶ specify the column(s) to include, can be repeated to show multiple columns
-
--noindent
¶
whether to disable indenting the JSON
-
--prefix
<PREFIX>
¶ add a prefix to all variable names
-
--max-width
<integer>
¶ Maximum display width, <1 to disable. You can also use the CLIFF_MAX_TERM_WIDTH environment variable, but the parameter takes precedence.
-
--fit-width
¶
Fit the table to the display width. Implied if –max-width greater than 0. Set the environment variable CLIFF_FIT_WIDTH=1 to always enable
-
--print-empty
¶
Print empty table if there is no data to show.
-
--project
PROJECT_ID
¶ Projects ID
-
--dataset
DATASET_ID
¶ Dataset’s ID
-
--constraint
TYPE=VALUE
¶ Field’s constraints, repeatable option (see documentationto get more information). This is repeatable option.
-
FIELD_ID
¶
UUID of field which should be updated
- Allowed constraints for all of types:
default (string) - default value
required (true/false) - required field
- Allowed constraints for integer/float fields:
max_value (integer/float) - maximum value
min_value (integer/float) - minimum value
- Allowed constraints for string fields:
lowercase (true/false) - field can only contain lowercase values
uppercase (true/false) - field can only contain uppercase values
alphanumeric (true/false) - field can only contain alpha-numeric values
regexp (regex expression) - field can only contain value matched to the regex expression
alpha (true/false) - field can only contain letters
numeric (true/false) - field can only contain numbers
min_length (integer) - minimum length of string
max_length (integer) - maximum length of string
Example of usage:
To update constraints of field add new constraints:
$ jexia dataset field update --project=8ae43645-2dfb-45c7-a7bd-991dde8b775a --dataset=825cbad3-f5b7-4d4c-a65e-07d3b5002929 --constrain default="another-value" --constraint required=false 8e151f87-eab7-4284-88d8-a2b51157a7a4
+-------------+--------------------------------------+
| Field | Value |
+-------------+--------------------------------------+
| id | 8e151f87-eab7-4284-88d8-a2b51157a7a4 |
| name | test-field |
| type | string |
| immutable | False |
| properties | {} |
| constraints | default=another-value, regexp=.* |
+-------------+--------------------------------------+
To remove constraint use empty (or false for boolean) value:
$ jexia dataset field update --project=8ae43645-2dfb-45c7-a7bd-991dde8b775a --dataset=825cbad3-f5b7-4d4c-a65e-07d3b5002929 --constrain default= 8e151f87-eab7-4284-88d8-a2b51157a7a4
+-------------+--------------------------------------+
| Field | Value |
+-------------+--------------------------------------+
| id | 8e151f87-eab7-4284-88d8-a2b51157a7a4 |
| name | test-field |
| type | string |
| immutable | False |
| properties | {} |
| constraints | regexp=.* |
+-------------+--------------------------------------+
dataset field delete¶
Delete field from the dataset
jexia dataset field delete
--project PROJECT_ID
--dataset DATASET_ID
FIELD_ID
-
--project
PROJECT_ID
¶ Projects ID
-
--dataset
DATASET_ID
¶ Dataset’s ID
-
FIELD_ID
¶
UUID of field which should be updated
dataset export¶
Export datasets
jexia dataset export
--project PROJECT_ID
[--with-data]
[--filter FILTER]
[--to TO]
[DATASET_ID [DATASET_ID ...]]
-
--project
PROJECT_ID
¶ Projects ID
-
--with-data
¶
Include data to result
-
--filter
<FILTER>
¶ Columns that should be exported (column1,column2)
-
--to
<TO>
¶ Result will be saved to file
-
DATASET_ID
¶
UUID of dataset to export
Example of usage:
To export 2 datasets with data and specific columns ypu can do something like this:
$ jexia dataset export --project=8ae43645-2dfb-45c7-a7bd-991dde8b775a --with-data --filter=status,app_id 8e151f87-eab7-4284-88d8-a2b51157a7a4 8534d548-43e5-4ea9-b941-2cd577e6fae8 > res.json
$ cat res.json
[
{
"data": [
{
"repo_name": "jexia-vue-todo",
"repo_url": "https://github.com/jexia/jexia-vue-todo.git"
}
],
"inputs": [
{
"constraints": [],
"name": "repo_url",
"type": "string"
},
{
"constraints": [],
"name": "repo_name",
"type": "string"
}
],
"name": "applications"
},
{
"data": [
{
"app_id": "c5c78cda-94fa-4c93-8941-8b9a31345233",
"status": "done"
},
{
"app_id": "c5c78cda-94fa-4c93-8941-8b9a31345233",
"status": "done"
}
],
"inputs": [
{
"constraints": [
{
"type": "required",
"value": true
}
],
"name": "app_id",
"type": "uuid"
},
{
"constraints": [
{
"type": "default",
"value": "pending"
}
],
"name": "status",
"type": "string"
}
],
"name": "builds"
}
]
dataset import¶
Import datasets
jexia dataset import --project PROJECT_ID [--file FILE]
-
--project
PROJECT_ID
¶ Projects ID
-
--file
<FILE>
¶ Dump file to import
Example of usage:
To export 2 datasets with data and specific columns ypu can do something like this:
$ jexia dataset import --project=41724d4f-2d2f-4106-ab6c-075481c2f161 < res.json
dataset "applications" created
dataset "builds" created