QVD#
Querona reads Qlik QVD files (.qvd) from a File connection. A QVD file is self-describing: it holds its fields,
their values and hints about their types, so every file maps to its own virtual table without any sampling or
parser settings. No Qlik product is needed.
SELECT * FROM sales_qvd;
You can also read QVD files ad-hoc, without importing metadata, with
OPENROWSET (BULK …) and FORMAT = 'QVD'.
Folder and schema mapping#
Like the other per-file formats, the connection’s folder layout maps to schemas: a file in the connection’s root folder maps to a table in the dbo schema, and each direct subfolder of the root becomes a schema.
QVD files are recognized by their .qvd extension, in any letter case: an import picks them up without the extension
being on the connection’s list of accepted file extensions, and OPENROWSET (BULK ...) needs no FORMAT for a path
ending in .qvd.
Key features#
the schema comes from the file, with no schema detection and no parser settings
only the fields a query selects are decoded, and a
TOProw limit stops the read earlyboth read paths: import as virtual tables, or read ad-hoc with
OPENROWSET (BULK ...)several files read as one rowset, matched by field name, so their fields may come in any order
local files only (files on the Querona server or a reachable network share)
Data types#
A QVD file states whether a value is a number or a text. Its tags and number format then refine a number into a date, a time or an amount. The first matching row decides:
Values of the field |
Tags or number format |
SQL type |
|---|---|---|
None at all |
|
|
Any text without a number |
|
|
All whole numbers |
|
|
All numbers |
|
|
All numbers below 1 |
|
|
All numbers |
|
|
All 32-bit integers |
|
|
All numbers |
|
A value Qlik holds as both a number and a display text reads as its number in a numeric column and as its text in a
text column. A number that cannot be converted to its column’s type, or that is beyond a decimal column’s precision,
reads as NULL. A text longer than its column refuses the read; through OPENROWSET with ANSI_WARNINGS OFF it is
truncated instead. A value outside a declared datetime, smalldatetime, money or smallmoney also refuses the
read. A declared datetime2(n) truncates fractional seconds to n digits.
Limitations#
Compressed and encrypted files are refused.
An import stops at the first file it cannot read, and the tables after it are not imported. Because every
.qvdfile in the connection’s folders is discovered, remove a damaged file or leave it out of the tables you select.Files in a binary container with a JSON header, a layout seen in files from 2015 and reported for early Qlik Sense releases, are refused. Store the file again with a current release.
Field names are matched exactly, including letter case. A file with two fields whose names differ only by letter case cannot be imported or described, because column names are not case-sensitive; read it through
OPENROWSETwith aWITHclause naming the field you want.A table’s columns come from one file. A later file lacking a field the query reads refuses the read, naming the column and the file; through
OPENROWSETthat column reads asNULLinstead.A table’s text columns are sized to the longest text in the file at import. When the file is stored again with a longer text, the read is refused. Import the table again.
A table imported before
.qvdwas recognised has columns sampled as delimited text. Import it again.