Data Query overview

Prev Next

Available in VPC

Data Query is a NAVER Cloud Platform service that allows you to easily analyze large amounts of structured or unstructured data with serverless interactive query. The Data Query service provides APIs for query execution and inquiry features in RESTful form.

Common Data Query settings

The following describes commonly used request and response formats in Data Query APIs.

Request

The following describes the common request format.

API URL

The request API URL is as follows:

https://kr.dataquery.naverncp.com

Request headers

The following describes the request headers.

Field Required Description
x-ncp-apigw-timestamp Required This is the number of milliseconds that have elapsed since January 1, 1970 00:00:00 UTC.
  • Request is considered invalid if the timestamp differs from the current time by more than 5 minutes.
  • Unix timestamp format.
x-ncp-iam-access-key Required Access key issued on NAVER Cloud Platform
x-ncp-apigw-signature-v2 Required Base64-encoded signature that encrypts the request information with a secret key that maps to the access key issued on NAVER Cloud Platform, using the HMAC encryption algorithm (HmacSHA256)
Content-Type Optional Request data format
  • application/json

Response

The following describes the common response format.

Response body

The response body includes the following data:

Error
Error defines API call failure information. The following describes each error.

Field Type Required Description
type String - Request URL
title String - Error type
status Integer - HTTP status code
detail String - Error status message
instance String - Error instance URI
errorCode Integer - Error status code

Response status codes

The following describes the response status codes.

HTTP status code Code Message Description Solution
400 400
  • Catalog 'public_data1' does not exist
  • Schema 'public_schema' does not exist
Query statement error Double-check the query statement and table information.
400 10010 Query Project Not Found Project ID error Check the query execution project ID.
  • For the Run query API, check the subscription status for the Data Query service.
400 10090 mismatched input 'table'. Expecting: <identifier> Query syntax error Double-check the query syntax.
400 10091 'DropCatalog' command is blocked. Unavailable query statement Change query statements after checking query syntax.
401 10002 Authentication Failed - This account is not allowed Authentication failed Check the authentication information in the request header.
403 10001 Change/executeSelectQuery No action permissions on the sub account Check sub account permissions.
Note

For information about the HTTP status codes common to all NAVER Cloud Platform, see Ncloud API response status codes.

Response example

For response examples when a call is successful, see each API specification. The following is a sample response upon a failed call.

{
    "type": "http://kr.dataquery.naverncp.com/api/v2/queries",
    "title": "query.error.BAD_REQUEST",
    "status": 400,
    "detail": "[query] must not be null",
    "instance": "/api/v2/queries",
    "errorCode": 400
}

Data Query API

The following describes the APIs provided by the Data Query service.

API Description
Execute query Run user query.
Run query asynchronously Run user query asynchronously.
Get query result Get user query execution results.
Get query history Get user query execution history.
Cancel query Cancel user query execution.

Data Query related resources

NAVER Cloud Platform provides a variety of related resources to help users better understand Data Query APIs.