EVL – ETL Tool

Table of Contents


Products, services and company names referenced in this document may be either trademarks or registered trademarks of their respective owners.

Copyright © 2017–2021 EVL Tool, s.r.o.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts.

qvd2csv

(since EVL 2.4)

Read <file.qvd> and write CSV file to <file.csv> or standard output. It uses data types from QVD header or from existing <evd> file or from <inline_evd>.

EVD is EVL data definition file, for details see man 5 evd.

Synopsis

syntax/qvd2csv
qvd2csv
  <file.qvd>
  [-o|--output=<file.csv>]
  [--all-as-string | --real-as-decimal[=<precision>,<scale>]]
  [-d|--date=<format>]
  [-h|--header=<field_name>,...]
  [-n|--no-header]
  [-l|--null=<string>]
  [-q|--quote=<char>]
  [-s|--separator=<char>]
  [-t|--datetime=<format>]
  [-a|--dos-eol | -b|--mac-eol]
  [-v|--verbose]

qvd2csv
  <file.qvd> (<evd>|-d <inline_evd>)
  [-m|--match-fields]
  [-o|--output=<file.csv>]
  [-h|--header=<field_name>,...]
  [-n|--no-header]
  [-a|--dos-eol | -b|--mac-eol]
  [-v|--verbose]

qvd2csv
  ( --help | --usage | --version )

Options

--all-as-string

interpret all fields as strings

-d, --data-definition=<inline_evd>

either this option or the file <evd> must be presented to use already defined (custom) EVD

-a, --dos-eol

output DOS end-of-line, i.e. CR+LF (‘\r\n’)

-b, --mac-eol

output Mac end-of-line, i.e. CR (‘\r’)

--date=<format>

to specify a <format> for date data type

-h, --header=<field_name>,...

use comma separated list of field names instead of header line, for example when you don’t want to use field names from QVD header.

-l, --null=<string>

to specify what string is used for NULL values in CSV, empty string is allowed

-n, --no-header

with this option it produces no header line

-o, --output=<file.csv>

write output into <file.csv> instead of standard output

-q, --quote=<char>

to use quoted fields for the CSV output. When data contains such <char>, all of them are escaped by duplicating them. For example using ‘--quote="\""’ will serve data like ‘some "text"’ as ‘"some ""text"""’.

--real-as-decimal[=<precision>,<scale>]

interpret ‘real’ data types as ‘decimal(<precision>,<scale>)’. When no <precision> or <scale> is specified, use values from environment variables ‘EVL_DEFAULT_DECIMAL_PRECISION’ and ‘EVL_DEFAULT_DECIMAL_SCALE’, which are by default set to 18 and 2.

-s, --separator=<char>

to use <char> as field separator for the CSV output

-t, --datetime=<format>

to specify a <format> for datetime data type

-v, --verbose

print to standard error output info/debug messages

--help

print this help and exit

--usage

print short usage information and exit

--version

print version and exit

Examples

  1. Having ‘some.qvd’, the command to produce CSV file with empty strings representing NULL values, dates in format ‘DD.MM.YYYY’ and with Windows end-of-line (i.e. CRLF):
    qvd2csv --null="" --date="%d.%m.%Y" --dos-eol some.qvd > some.csv