Protocol Documentation

January 16, 2018 · View on GitHub

Table of Contents

Top

ServerSideExtension.proto

BundledRows

A number of rows collected in one message. The actual number will depend on the size of each row and is adjusted to optimize throughput.

FieldTypeLabelDescription
rowsRowrepeated

Capabilities

A full description of the plugin, sent to the Qlik engine, listing all functions available and indicating whether script evaluation is allowed.

FieldTypeLabelDescription
allowScriptbooloptionalWhen true, the Qlik engine allows scripts to be sent to the plugin.
functionsFunctionDefinitionrepeatedThe definitions of all available functions.
pluginIdentifierstringoptionalThe ID or name of the plugin.
pluginVersionstringoptionalThe version of the plugin.

CommonRequestHeader

A header sent at the start of both an EvaluateScript request and an ExecuteFunction request under the key "qlik-commonrequestheader-bin".

FieldTypeLabelDescription
appIdstringoptionalThe ID of the app the request was executed in.
userIdstringoptionalThe ID of the user the request was executed by.
cardinalityint64optionalThe cardinality of the parameters.

Dual

The basic data type for the data stream. Can contain double, string, or both.

FieldTypeLabelDescription
numDatadoubleoptionalNumeric value as double.
strDatastringoptionalString.

Empty

An empty message used when nothing is to be passed in a call.

FieldTypeLabelDescription

FieldDescription

Field definition for function and script calls.

FieldTypeLabelDescription
dataTypeDataTypeoptionalThe data type of the field.
namestringoptionalThe name of the field.
tagsstringrepeatedThe tags of the field.

FunctionDefinition

The definition of a function, which informs the Qlik engine how to use it.

FieldTypeLabelDescription
namestringoptionalThe name of the function.
functionTypeFunctionTypeoptionalThe type of the function.
returnTypeDataTypeoptionalThe return type of the function.
paramsParameterrepeatedThe parameters the function takes.
functionIdint32optionalA unique ID number for the function, set by the plugin, to be used in calls from the Qlik engine to the plugin.

FunctionRequestHeader

A header sent at the start of an ExecuteFunction request under the key "qlik-functionrequestheader-bin".

FieldTypeLabelDescription
functionIdint32optionalThe ID of the function to be executed.
versionstringoptionalA dummy variable as a workaround for an issue.

Parameter

Parameter definition for functions and script calls.

FieldTypeLabelDescription
dataTypeDataTypeoptionalThe data type of the parameter.
namestringoptionalThe name of the parameter.

Row

A row of duals.

FieldTypeLabelDescription
dualsDualrepeatedRow of duals.

ScriptRequestHeader

A header sent at the start of an EvaluateScript request under the key "qlik-scriptrequestheader-bin".

FieldTypeLabelDescription
scriptstringoptionalThe script to be executed.
functionTypeFunctionTypeoptionalThe function type of the script evaluation: scalar, aggregation or tensor.
returnTypeDataTypeoptionalThe return type from the script evaluation: numeric, string or both.
paramsParameterrepeatedThe parameters names and types passed to the script.

TableDescription

A header sent before returning data to Qlik, under the key "qlik-tabledescription-bin".

FieldTypeLabelDescription
fieldsFieldDescriptionrepeatedThe fields of the table.
namestringoptionalThe name of the table.
numberOfRowsint64optionalNumber of rows in table.

DataType

Data types of the parameters and return values.

NameNumberDescription
STRING0Contains only string.
NUMERIC1Contains only double.
DUAL2Contains both a string and a double.

FunctionType

Types of functions (determined by their return values).

NameNumberDescription
SCALAR0The return value is a scalar per row.
AGGREGATION1All rows are aggregated into a single scalar.
TENSOR2Multiple rows in, multiple rows out.

Connector

The communication service provided between the Qlik engine and the plugin.

Method NameRequest TypeResponse TypeDescription
GetCapabilitiesEmptyCapabilitiesA handshake call for the Qlik engine to retrieve the capability of the plugin.
ExecuteFunctionBundledRowsBundledRowsRequests a function to be executed as specified in the header.
EvaluateScriptBundledRowsBundledRowsRequests a script to be evaluated as specified in the header.

Scalar Value Types

.proto TypeNotesC++ TypeJava TypePython Type
doubledoubledoublefloat
floatfloatfloatfloat
int32Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead.int32intint
int64Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead.int64longint/long
uint32Uses variable-length encoding.uint32intint/long
uint64Uses variable-length encoding.uint64longint/long
sint32Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s.int32intint
sint64Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s.int64longint/long
fixed32Always four bytes. More efficient than uint32 if values are often greater than 2282^{28}.uint32intint
fixed64Always eight bytes. More efficient than uint64 if values are often greater than 2562^{56}.uint64longint/long
sfixed32Always four bytes.int32intint
sfixed64Always eight bytes.int64longint/long
boolboolbooleanboolean
stringA string must always contain UTF-8 encoded or 7-bit ASCII text.stringStringstr/unicode
bytesMay contain any arbitrary sequence of bytes.stringByteStringstr