Data Resource - Data Selector
About
A data selector is a data uri expression that permits to select:
- data resources (file, table,…)
- or container resources (directory, schema, …)
If you are new to the concept of data selector, we encourage you to take a look at this page: Learning Tabulify - Step 4 - How to select Data Resources
Syntax
This syntax select data resources listed in the connection
globPath[@connection]
where:
- connection is the name of a connection
- globPath is a path composed of glob pattern separated by a path separator
You can reference each wildcard character in a target data uri to define the target resources.
File System
For a file system, the following special character are supported in the path:
- / for the separator
- . to design the current working directory
- .. to design the parent directory of the current working directory
Example:
- Absolute
# Linux
/globPatternForDirectory/globPatternForFile@fileSystemConnection
# Windows
C:\globPatternForDirectory\globPatternForFile@fileSystemConnection
- Relative
# Linux (and Windows)
../globPatternForDirectory/globPatternForFile@fileSystemConnection
# Windows form works also but is not recommended
..\globPatternForDirectory\globPatternForFile@fileSystemConnection
Sql Database
For a sql database, the following characters are supported in the path:
- ., for the path name separator
- / to design the current schema
- // to design the parent (schema, catalog)
# an sql object pattern
[catalogueGlobPattern][.schemaNamePattern.]objectNamePattern@database
# a sql schema pattern
//.schemaNamePattern
# a sql catalog pattern
//.//.schemaNamePattern
Http (Web)
For a web system, Tabulify supports passing directly an URI/URL as a data selector.
Only in bash based terminal, see why
tabul data info "https://en.wikipedia.org/w/api.php?action=query&titles=SQL&format=xml&prop=description"
Information about the data resource ([email protected]\w)
attribute value description
---------------- ------------------------------------------------------------------------------------------------ ----------------------------------------------------------------------
CHARACTER_SET UTF-8 The character set of the file
COLUMN_NAME xml The name of the column when the text content is returned on one column
END_OF_RECORD � The End Of Record string sequence
URI https://en.wikipedia.org/w/api.php?prop=description&format=xml&action=query&titles=SQL The URI of the file
ABSOLUTE_PATH /w/api.php The absolute path on the data system
ACCESS_TIME The access time (access time)
COMMENT A comment
CONNECTION https-en.wikipedia.org\w The connection name
COUNT 1 The number of records
CREATION_TIME The creation time (birth time)
DATA_URI [email protected]\w The data uri
KIND xml The kind of media
LOGICAL_NAME api The logical name
MD5 3547b7e2532d9d3faab43788fa3b16e0 The Md5 hash
MEDIA_SUBTYPE xml The media subType
MEDIA_TYPE text/xml The media type
NAME api.php The name of the data resource
PARENT The parent
PATH api.php The relative path to the default connection path
SHA384 821189e9ced47527c2811626813b417adf4152fd02bec10c2a36f95ea9e8d158653e80216edb1b890cef49c449e3a9e0 The Sha384 hash
SHA384_INTEGRITY sha384-ghGJ6c7UdSfCgRYmgTtBet9BUv0CvsEMKjb5Xqno0VhlPoAhbtsbiQzvScRJ46ng The sha384 value used in the html integrity attribute
SIZE -1 The number of byte
TABULAR_TYPE data The tabular type
UPDATE_TIME The last update time (modify time)