Submit a DB Tap Query Command

POST /api/v1.2/commands/

This API is to submit a DB Tap query.

Required Role

The following roles can make this API call:

  • A user who is part of the system-user/system-admin group.
  • A user invoking this API must be part of a group associated with a role that allows submitting a command. See Managing Groups and Managing Roles for more information.



Parameters marked in bold below are mandatory. Others are optional and have default values.

Parameter Description
query Specify DB Tap query to run.
db_tap_id Specify the DB Tap id of the target database to run the query on.
command_type DbTapQueryCommand
macros Expressions to evaluate macros used in the DB Tap Query command. Refer to Macros in Scheduler for more details.
name Add a name to the command that is useful while filtering commands from the command history. It does not accept & (ampersand), < (lesser than), > (greater than), ” (double quotes), and ‘ (single quote) special characters, and HTML tags as well. It can contain a maximum of 255 characters.
tags Add a tag to a command so that it is easily identifiable and searchable from the commands list in the Commands History. Add a tag as a filter value while searching commands. It can contain a maximum of 255 characters. A comma-separated list of tags can be associated with a single command. While adding a tag value, enclose it in square brackets. For example, {"tags":["<tag-value>"]}.
macros Denotes the macros that are valid assignment statements containing the variables and its expression as: macros: [{"<variable>":<variable-expression>}, {..}]. You can add more than one variable. For more information, see Using Macros in Qubole.
timeout It is a timeout for command execution that you can set in seconds. Its default value is 129600 seconds (36 hours). QDS checks the timeout for a command every 60 seconds. If the timeout is set for 80 seconds, the command gets killed in the next minute that is after 120 seconds. By setting this parameter, you can avoid the command from running for 36 hours.


Goal: Show tables

curl -i -X POST -H "X-AUTH-TOKEN: $AUTH_TOKEN" -H "Content-Type: application/json" -H "Accept: application/json" -d '{"command_type": "DbTapQueryCommand", "db_tap_id":"1",  "query":"show tables"}' ""


The above syntax uses as the endpoint. Qubole provides other endpoints to access QDS that are described in Supported Qubole Endpoints on Different Cloud Providers.


HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

   "query":"show tables",