Skip to main content Skip to complementary content

QvxRequest XML schema

<?xml version="1.0" encoding="UTF-8"?>

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">

  <xs:simpleType name="QvxCommand">

      <xs:restriction base="xs:string">

        <xs:enumeration value="QVX_CONNECT"/>

        <xs:enumeration value="QVX_EXECUTE"/>

        <xs:enumeration value="QVX_EDIT_CONNECT"/>

        <xs:enumeration value="QVX_EDIT_SELECT"/>

       <xs:enumeration value="QVX_GENERIC_COMMAND"/>

        <xs:enumeration value="QVX_DISCONNECT"/>

        <xs:enumeration value="QVX_TERMINATE"/>

        <xs:enumeration value="QVX_PROGRESS"/>

        <xs:enumeration value="QVX_ABORT"/>

      </xs:restriction>

  </xs:simpleType>

 

  <xs:complexType name="QvxConnectOptions">

    <xs:all>

      <xs:element name="Provider" type="xs:string" />

      <xs:element name="LoginTimeoutSec" type="xs:integer" />

      <xs:element name="ConnectTimeoutSec" type="xs:integer" />

      <xs:element name="AutoCommit" type="xs:boolean" />

      <xs:element name="ReadOnly" type="xs:boolean" />

      <xs:element name="AllowPrompt" type="xs:boolean" />

    </xs:all>

  </xs:complexType>

 

  <xs:element name="QvxRequest">

    <xs:complexType>

      <xs:all>

        <xs:element name="Command" type="QvxCommand" />

        <xs:element name="Parameters">

          <xs:complexType>

            <xs:sequence>

              <xs:element name="String" type="xs:string" maxOccurs="unbounded"/>

            </xs:sequence>

          </xs:complexType>

        </xs:element>

        <xs:element name="Options" type="QvxConnectOptions" minOccurs="0" />

      </xs:all>

    </xs:complexType>

  </xs:element>

</xs:schema>

QvxRequest Element

Elements

Child Element

Description

Command

Command to be executed by the Connector.

Parameters

Array of strings. Holds command specific parameters.

Options

Connection options.

QvxCommand Type

Types and values

Type Value

Description

QVX_CONNECT

Connect to the data source using the given connect string.

The command is sent during script reload while executing CUSTOM CONNECT statement.

Request parameters:

[0] - a modified connect statement: a) rprovider parameter and value are removed; b) scrambled XUserId and XPassword are substituted with unscrambled UserId and Password parameters.

Request options:

Include connection specific settings.

Reply:

  • QVX_OK, if connection to the data source is established successfully.

QVX_EXECUTE

Execute the given statement and return the data via data pipe.

The command is sent during script reload and by Select Wizard. SELECT statement is used for fetching actual data from the data source. TABLES, COLUMNS and TYPES (represent SQLTABLES, SQLCOLUMNS and SQLTYPES commands  defined in QlikView syntax) are used for fetching the data source metadata.

Request parameters:

[0] - statement to execute:SELECT, TABLES, COLUMNS and TYPES

[1]  - data pipe name.

[2] - a list of semicolon separated statement specific parameters. E.g. "TABLE_NAME=XYX" asks to return metadata for XYZ table. If no table name is specified for TABLES and COLUMNS commands, then metadata for all tables should be returned. E.g."BLOB=2;" specifies that the second field should be retrieved as BLOB (SELECT statement).

Reply:

  • QVX_OK, if the given statement is executed successfully.

Data pipe:

  • QlikView and Qlik Sense start reading data pipe only if QVX_OK is received.
  • Data is formatted according to the QVX file format.

    QVX file format

  • TABLES result data structure: Field [0] - TABLE_NAME. Field [1] - TABLE_TYPE. Value: "TABLE". Field [2] - CATALOG_NAME (optional). Field [3] - SCHEMA_NAME (optional). Field [4] - REMARKS (optional).
  • COLUMNS result data structure: Field [0] - TABLE_NAME. Field [1] - COLUMN_NAME. Field [2] - DATA_TYPE (optional). Field [3] - IS_NULLABLE (optional). Value the way it will be represented to the user. Field [4] - REMARKS (optional). Field [5] - IS_BLOB (optional). Values"true" or "false" (default)..
  • TYPES result data structure is not predefined.

QVX_EDIT_CONNECT

Create a connect statement.

In future releases this request may also be used for requesting modification of existing connect statements.

The request is sent on Connect button click. Also it is sent on Select and Custom buttons click, if QlikView or Qlik Sense does not have connect information for the data source.

Request parameters:

[0] - empty parameter for creating a new connect statement and connect statement for editing the existing connect statement.

Request options:

Include connection specific settings.

Reply:

  • QVX_OK, if the connect statement was created or modified successfully. Connection to the data source does not have to be established.
  • OutputValues[0] - created or modified connect statement.

QVX_EDIT_SELECT

Create a select statement.

In future releases this request may also be used for requesting modification of existing select statements.

The request is sent on Custom button click.

Request parameters:

[0] - empty parameter for creating a new select statement and connect statement for editing the existing select statement.

[1] - connect statement. Describes the last data source selected by the user for connection.

Reply:

  • QVX_OK, if the select statement was created or modified successfully.
  • OutputValues[0] - created or modified select statement.

QVX_GENERIC_COMMAND

Execute commands specified by the 1st parameter and return the result via command pipe. Parameters are command specific.

The commands are sent on opening Script Editor and on Select button click.

GetCustomCaption - if the Connector supports the custom button, then return the caption for this button.

Request parameters:

[0] - "GetCustomCaption".

Reply:

  • QVX_OK, if command executed successfully.
  • OutputValues[0] - custom button caption.

IsConnected - true, if the Connector is connected to the currently set data source.

Request parameters:

[0] - "IsConnected".

Reply:

  • QVX_OK, if command executed successfully.
  • OutputValues[0] - "true"/"false".

 

DisableQlikViewSelectButton - true, if QlikView or Qlik Sense Select Wizard, that is, Select button, should be disabled.

Request parameters:

[0] - "DisableQlikViewSelectButton".

Reply:

  • QVX_OK, if command executed successfully.
  • OutputValues[0] - "true"/"false".

HaveStarField - true, if the datasource understands the "*" syntax in select statements, i.e. "SELECT * FROM..." is valid.

Request parameters:

[0] - "HaveStarField".

Reply:

  • QVX_OK, if command executed successfully.
  • OutputValues[0] - "true"/"false".

JsonRequest - information requested by the command.

 

Request parameters:

method name; for example, getInfo

Reply:

  • “QvxReply”: “{\”name\”:\value\}”

QVX_DISCONNECT

Disconnect from the currently connected data source.

Reply:

  • QVX_OK, if successfully disconnected from the data source.

QVX_TERMINATE

Clean-up as the process will be terminated. If QlikView or Qlik Sense receives a reply, then it closes the command pipe and terminates the Connector process. Otherwise make sure to terminate.

Reply:

  • QVX_OK, if clean-up is finished and QlikView or Qlik Sense can terminate the Connector process.

QVX_PROGRESS

Currently not used.

Reply:

  • QVX_UNSUPPORTED_COMMAND, to enable forward compatibility.

QVX_ABORT

Currently not used.

Reply:

  • QVX_UNSUPPORTED_COMMAND, to enable forward compatibility.

QvxConnectOptions Type

Element types

Child Element

Description

Provider

Connector name that is equivalent to the Connector file name.

LoginTimeoutSec

The number of seconds to wait for a login request to complete before returning to the application.

ConnectTimeoutSec

The number of seconds to wait for any request on the connection to complete before returning to the application.

AutoCommit

If true, automatically commit SQL statement immediately after it is executed.

ReadOnly

If true, open data source as read-only.

AllowPrompt

If true, then user prompts are allowed.

Information noteThis option is always set to false for Qlik Sense.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!