About
select is a data operation that selects data Resources.
This is not the select sql statement. The select sql statement selects records while the select operation selects Data Resources.
See the following learning guide page, to known more: Learning Tabulify - Step 4 - How to select Data Resources
Arguments
The select operations has the following arguments.
Argument | Default | Description |
---|---|---|
data selector | - | It will select data resources by name |
the with-dependencies option | false | If set to true, the dependencies will be added |
strict | false | If set to true, the select operation will throw an error if the selection does not return any data resource |
type | Optional, detected by default | The media type of the selected resources |
logical-name | Optional | A template logical name |
Data Definition | ||
data-definition | Optional | A inline data definition |
attributes | a map of key value | The attributes of the data path |
Usage
In a pipeline pipeline, this is a first operation (known as the supplier operation) because it supplies data resources to the others operations in the pipeline.
Example:
- Simple selection:
pipeline:
- name: 'Select data resources'
operation: select
args:
data-selector: pattern@connection
with-dependency: (yes|no)
strict: yes
In a tabli data command, you set :
- the data selector as argument
- and the with-dependencies as flag
- and the not-strict as flag
Example:
tabli data command [--not-strict] [--with-dependency] dataSelector
Note on Empty Selection
If no data resource matched the data selector, this is not considered an error. This is already the case for all sql statement (ie an update that does not match a row does not return an error)
If you want to throw an error, you should set the strict option to true.