Data Resource - Template Data URI
About
A template data uri is a data uri that defines one or more resources via template.
Example
Reusing the name of the source in the target
The below target data uri
new_$name@sqlite
will define the target resource
- located in the sqlite connection
- and a name that is composed of
- the prefix new_
- and the name of the data source ($name)
Example: if the source table name is time, the target table name would be new_time
Using a part of source name in the target
With a glob pattern, you can reference parts of the source.
Example with the below data selector
D?*@sqlite
and the below target data uri
# 2 for the second glob pattern (ie for the *), 1 being for the first ?
$2@sqlite
- if the source table name were D_TIME, D_CUSTOMERS,
- the target table names would be TIME, CUSTOMERS
File system
In a shell such as powershell, the $ character should be quoted.
tabul data copy '*/bootstrap.min.css@cd' '/boot/bootstrap.$1.min.css@cd'
Syntax
template[@connection]
where:
- connection is the name of a connection
- template is an target template (a template expression that define the name of the target).
Note on Cross transfer to the file system
Note that if:
- and the target is a file system
the target name is calculated by a concatenation of:
- the logical name
- and the media type of the TABULAR_FILE_TYPE file system parameter