Glob Pattern
Glob pattern are used in Tabulify to select objects such as :
- resource (in data selector)
If you are new to glob pattern, see this page How to select data resources with a Glob Pattern
Wildcard support
The following wildcard are supported in order to define the glob pattern:
- * that matches every characters
- ** matches all container (directories/schema). Use for recursive search (for instance **/foo.md will search all foo.md files in all sub directories)
- ? that matches a single character
- [] that matches a class of character (Example: [0-9] matches all digit)
- [!] that does not match a character in the class of character. (Example: [!0-9] will not match a digit)
- {pattern1,pattern2,..} to match a collection of sub-pattern (Example: {temp*,tmp*} matches all data resource name that begins with temp or tmp). It creates also a group for back-referencing.
Back-referencing
When data resources are selected via globbing, they get extra numeric variables that captures the text that matches.
ie:
- the variable 1 is the text captured by the first glob pattern
- the variable 2 is the text captured by the second glob pattern
- and so on.
You can use this extra variable in:
Example with the data list command that:
- selects the table that starts with web on a tpcds schema
- shows the logical and the 1 first back-reference value
tabli data list -a logicalName -a 1 web_*@tpcds
logicalName 1
----------- -------
web_page page
web_returns returns
web_sales sales
web_site site