Submit SQL Statement | Teradata Query Service - Submitting SQL Statement - Teradata Query Service

Teradata® Query Service Installation, Configuration, and Usage Guide for Customers - 4.01.03.01, 4.01.07.00

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Teradata Query Service
Release Number
4.01.03.01, 4.01.07.00
Published
September 2023
Language
English (United States)
Last Update
2024-02-16
dita:mapPath
qla1666844235399.ditamap
dita:ditavalPath
ft:empty
dita:id
enn1467244092237
Product Category
Analytical Ecosystem

To submit a SQL request to a Teradata Database using Query Service, send a POST request to the /system/[systemName]/queries endpoint, replacing [systemName] with the preconfigured alias of the system. The request contains credentials required to access the Teradata Database.

POST /systems/mysystem/queries HTTP/1.1 Authorization: Basic ZGJjOmRiYw==
Accept: application/vnd.com.teradata.rest-v1.0+json Content-Type: application/json

{
"query”:”SELECT * FROM DBC.DBCInfo”,
"format":”array", "includeColumns":true
}
The request includes:
  • SELECT * FROM DBC.DBCInfo: The query to the system with the alias "mysystem".
  • "format": "array": The format for response.
  • "includeColumns": true: The request to include column information.

Responses to SQL requests are synchronous, meaning the HTTP response to the HTTP request contains the SQL request results.