Query Configuration

Query configuration parameters can be used to control over certain aspects of query script execution. They may have different scope depending on where they are defined:

  1. System configuration applies parameter values system wide
  2. INIT directive applies parameter values in the scope of a script. Overrides system configuration.
  3. LIST and PARSE commands - parameter supplied in argument list applies to the command only. Overrides INIT directive.

Configuration parameter names consist of labels separated by dot “.” symbols. The first label is always query, followed by optional namespace and the last label is parameter name:

query.namespace_name.param_name
Name Type Default value Description
query.now
TIMESTAMP or
LONG
now()
Timestamp or LONG value of Unix time setting current
time for a query. This allows you to run script
retrospectively without changing the code.
See example.
query.batch_mode
BOOLEAN
false
Controls query_execution_mode [1]: false means
interactive mode, true means batch mode
query.timezone
STRING
set in user profile
String value specifying abbreviated timezone name
query.charset
STRING
UTF-8
String value specifying character set name for converting
query.max_tasks
INTEGER
# licensed PU’s
Allows to control the processing capacity - set the
number of Processing Units that will process the query.
The number can not exceed the physical and licenced
number of PU’s.
query.list.ignoreErrors
BOOLEAN
false
If set to FALSE then query processing will be
stopped at errors. When set to TRUE then processing
continues and error message is written to Query log tab.
query.list.ignoreFullyDefinedUriNotFoundErrors
BOOLEAN
false
If set to FALSE then listing process will be
stopped at file-not-found errors for fully defined URI
(having no patterns) listings. When set to TRUE then
such errors are silently ignored.
query.list.includeBlobsDisallowedInACL
BOOLEAN
false
If set to FALSE then blobs disallowed from reading by blob
read ACL get not included in listing result set.
query.parse.ignoreErrors
BOOLEAN
false
When set to TRUE then script execution is not
interrupted at input data related errors, such as file
content not available, decompression failures, etc.
query.parse.maxRecordSize
INTEGER
max length of pattern
Specifies max record length
query.parse.chunkSize
INTEGER
64000000
Size of data split between simultaneous distributed
query tasks processing plaintext blobs
query.parse.chunkSizeCompressed
INTEGER
16000000
Size of data split between simultaneous distributed
query tasks processing compressed blobs

Query configuration parameters can be accessed using CONFIG() function.

Example. Set the current time to the date of interest:

1
2
3
4
5
init(
    '_query.now':T('2016-03-13 15:00:00')
);

dual(10) | select(t);
[1]Normally the queries are executed in the interactive mode - when a user logs out or client (web browser) connection is dropped for more than a minute during the execution, then query processing gets canceled. The opposite of that is the batch mode - query is executed regardless of client connection state. This is useful in case of long-running queries storing results.