Apache Kylin : Analytical Data Warehouse for Big Data
Welcome to Kylin Wiki.
Query
POST /kylin/api/query
Request Body
Variable name | Necessary | Type | Description |
---|---|---|---|
sql | yes | string | The text of sql statement |
offset | no | int | Query offset. If offset is set in sql, curIndex will be ignored |
limit | no | int | Query limit. If limit is set in sql, perPage will be ignored |
acceptPartial | no | bool | Whether accept a partial result or not, default be “false”. Set to “false” for production use |
project | no | string | Project to perform query. Default value is “DEFAULT” |
Request Sample
Curl Example
curl -X POST -H "Authorization: Basic XXXXXXXXX" -H "Content-Type: application/json"
-d '{ "sql":"select count(*) from kylin_sales", "project":"learn_kylin" }' http://localhost:7070/kylin/api/query
Response Body
Variable name | Description |
---|---|
columnMetas | Column metadata information of result set |
results | Data set of result |
cube | Cube used for this query |
affectedRowCount | Count of affected row by this sql statement |
isException | Whether this response is an exception |
ExceptionMessage | Message content of the exception |
Duration | Time cost of this query |
Partial | Whether the response is a partial result or not. Decided by |
Response Sample
Prepare query
POST /kylin/api/query/prestate
Request Body
Variable name | Necessary | Type | Description |
---|---|---|---|
sql | yes | string | The text of sql statement |
offset | no | int | Query offset. If offset is set in sql, curIndex will be ignored |
limit | no | int | Query limit. If limit is set in sql, perPage will be ignored |
acceptPartial | no | bool | Whether accept a partial result or not, default be “false”. Set to “false” for production use |
project | no | string | Project to perform query. Default value is “DEFAULT” |
Request Sample
Save query
POST /kylin/api/saved_queries
Request Body
Variable name | Necessary | Type | Description |
---|---|---|---|
sql | yes | string | The text of sql statement |
name | yes | string | Sql name |
project | yes | string | Project to perform query |
description | no | bool | Sql description |
Request Sample
Remove saved query
DELETE /kylin/api/saved_queries/{id}
Path Variable
Variable name | Necessary | Type | Description |
---|---|---|---|
id | yes | string | The id of saved query you want to remove |
Get saved queries
GET /kylin/api/saved_queries
Response Sample
Get running queries
GET /kylin/api/query/runningQueries
Stop Query
PUT /kylin/api/query/{queryId}/stop
Path Variable
Variable name | Necessary | Type | Description |
---|---|---|---|
queryId | yes | string | The queryId of you want to stop. You can obtain it by |
List queryable tables
GET /kylin/api/tables_and_columns
Request Parameters
Variable name | Necessary | Type | Description |
---|---|---|---|
project | yes | string |
|
Response Sample
Overview
Content Tools
ThemeBuilder
Apps