qvd-header
(since EVL 0.2)
Take the header of <file.qvd>
or standard input and produce to standard output particular
information, for example EVL data definition file or number of records.
Synopsis
qvd-header [<file.qvd>] --output=evd [--all-as-string | --real-as-decimal[=<precision>,<scale>]] [-d|--date=<format>] [--inline] [-l|--null=<string>] [-q|--quote=<char>] [-r|--record-separator=<char>] [-s|--field-separator=<char>] [-t|--datetime=<format>] [-v|--verbose] qvd-header [<file.qvd>] --output=(json|xml) [--fields] [-v|--verbose] qvd-header [<file.qvd>] [ --table-name | --no-of-records | --fields | --tag=<xml_tag_name> ] [-v|--verbose] qvd-header ( --help | --usage | --version )
Options
- --no-of-records
-
return the value of ‘NoOfRecords’ tag
- --fields
-
provide only fields’ information
- --table-name
-
return the value of ‘TableName’
- --tag=<xml_tag_name>
-
return the value of
<xml_tag_name>
Output Options:
- --output=evd
-
return EVD data types definition
- --output=json
-
return information as JSON
- --output=xml
-
return information as XML
EVD options:
- --all-as-string
-
produce EVD with all fields as strings
- -d, --date=<date_format>
-
use format argument for date data type
- --inline
-
output EVD, XML or JSON in the inline format (for example to use EVD by other component with ‘-d’ option)
- -l, --null=<string>
-
to specify what string is used for NULL values in EVD
- -q, --quote=<char>
-
to use a quote argument in EVD
- --real-as-decimal[=<precision>,<scale>]
-
produce EVD with ‘decimal(<precision>,<scale>)’ instead of ‘double’. When no
<precision>
or<scale>
is specified, it uses values from environment variables ‘EVL_DEFAULT_DECIMAL_PRECISION’ and ‘EVL_DEFAULT_DECIMAL_SCALE’, which are by default set to 18 and 2. - -r, --record-separator=<char>
-
use ‘sep="<char>"’ for last field
- -s, --field-separator=<char>
-
use ‘sep="<char>"’ for each field
- -t, --datetime=<date_format>
-
use format for datetime data type
Standard options:
- --help
-
print this help and exit
- --usage
-
print short usage information and exit
- -v, --verbose
-
print to stderr info/debug messages of the component
- --version
-
print version and exit
Examples
- EVD example:
qvd-header some.qvd --output=evd --record-separator="\n" \ --null="" --date="%Y-%m-%d"
will produce for example:
id int null="" some_stamp datetime null="" some_date date("%Y-%m-%d") null="" value string null="" sep="\n"
- JSON example:
qvd-header some.qvd --output=json --fields
will produce for example:
{ "fields": [ { name: "REQUEST_HOUR", type: "timestamp", format: "%Y-%m-%d" }, ... ] }
And:
qvd-header some.qvd --output=json
will produce for example:
{ "name": "Table1", "records": 3615, "fields": [ { name: "REQUEST_HOUR", type: "timestamp", format: "%Y-%m-%d", "tags": [ "$numeric", "$timestamp" ] }, ... ] }