Skip to main content

Query

Initiate a query to Wren Engine.

POST /v2/ibis/{data_source}/query

Path parameters

Query parameters

  • dryRun: True | False. If the parameter is set to True, this API will perform a dry run of the SQL. If successful, it will return an HTTP status code of 204. If it fails, it will return an HTTP status code of 422.

Request body

  • sql: string, required
  • manifestStr: string, required. It’s a base64 string of the Manifest file
  • connectionInfo: Fill in the information, as in here Connection Info
  • columnDtypes: key-value Object. If this field is set, it will forcibly convert into certain type.
{
"sql": "select * from \"Orders\" limit 1",
"manifestStr": "eyJjYXRhbG9nIjoibXlfY2F0YWxvZyIsInNjaGVtYSI6Im15X3...",
"connectionInfo": {
"host": "localhost",
"port": 5432,
"database": "dbname",
"user": "username",
"password": "password"
}
}

Response body

  • columns: Columns in array.
  • data: Raw data in array
  • dtypes: The dataframe types.
{
"columns": [
"o_orderkey",
"o_custkey",
"o_orderstatus",
"o_totalprice",
"o_orderdate",
"o_orderpriority",
"o_clerk",
"o_shippriority",
"o_comment"
],
"data": [
[
1,
370,
"O",
172799.49,
820540800000,
"5-LOW",
"Clerk#000000951",
0,
"nstructions sleep furiously among "
]
],
"dtypes": {
"o_orderkey": "int32",
"o_custkey": "int32",
"o_orderstatus": "object",
"o_totalprice": "object",
"o_orderdate": "object",
"o_orderpriority": "object",
"o_clerk": "object",
"o_shippriority": "int32",
"o_comment": "object"
}
}