Skip to main content

Query

Query data

POST /v2/ibis/{data_source}/query

Path parameters

Query parameters

  • dryRun: True | False. If the parameter is True. This API will dry-run the SQL. If successful, it will return HTTP status code 204. If it fails, it will return HTTP status code 422.

Request body

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

Response body

  • columns
  • data
  • dtypes: Type through the pandas
{
"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"
}
}