Ask eng
curl --request POST \
--url https://api.example.com/api/dataeng/ask \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"tables": [
"<string>"
],
"prompt": "<string>",
"job_name": "<string>",
"federated": true,
"preview": true
}
'import requests
url = "https://api.example.com/api/dataeng/ask"
payload = {
"tables": ["<string>"],
"prompt": "<string>",
"job_name": "<string>",
"federated": True,
"preview": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
tables: ['<string>'],
prompt: '<string>',
job_name: '<string>',
federated: true,
preview: true
})
};
fetch('https://api.example.com/api/dataeng/ask', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/dataeng/ask",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'tables' => [
'<string>'
],
'prompt' => '<string>',
'job_name' => '<string>',
'federated' => true,
'preview' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/dataeng/ask"
payload := strings.NewReader("{\n \"tables\": [\n \"<string>\"\n ],\n \"prompt\": \"<string>\",\n \"job_name\": \"<string>\",\n \"federated\": true,\n \"preview\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/api/dataeng/ask")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"tables\": [\n \"<string>\"\n ],\n \"prompt\": \"<string>\",\n \"job_name\": \"<string>\",\n \"federated\": true,\n \"preview\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/dataeng/ask")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"tables\": [\n \"<string>\"\n ],\n \"prompt\": \"<string>\",\n \"job_name\": \"<string>\",\n \"federated\": true,\n \"preview\": true\n}"
response = http.request(request)
puts response.read_body{
"query": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"data": {
"start": 123,
"row_count": 123,
"columns": [
"<string>"
],
"next_start": 123,
"data": [
[
"<unknown>"
]
]
},
"error": "<string>"
}{
"error": "<string>",
"code": 500
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Engineer
Ask eng
Ask a question about the data domain to generate a data engineering query. Returns the interpreted query details.
POST
/
api
/
dataeng
/
ask
Ask eng
curl --request POST \
--url https://api.example.com/api/dataeng/ask \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"tables": [
"<string>"
],
"prompt": "<string>",
"job_name": "<string>",
"federated": true,
"preview": true
}
'import requests
url = "https://api.example.com/api/dataeng/ask"
payload = {
"tables": ["<string>"],
"prompt": "<string>",
"job_name": "<string>",
"federated": True,
"preview": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
tables: ['<string>'],
prompt: '<string>',
job_name: '<string>',
federated: true,
preview: true
})
};
fetch('https://api.example.com/api/dataeng/ask', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/dataeng/ask",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'tables' => [
'<string>'
],
'prompt' => '<string>',
'job_name' => '<string>',
'federated' => true,
'preview' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/dataeng/ask"
payload := strings.NewReader("{\n \"tables\": [\n \"<string>\"\n ],\n \"prompt\": \"<string>\",\n \"job_name\": \"<string>\",\n \"federated\": true,\n \"preview\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/api/dataeng/ask")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"tables\": [\n \"<string>\"\n ],\n \"prompt\": \"<string>\",\n \"job_name\": \"<string>\",\n \"federated\": true,\n \"preview\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/dataeng/ask")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"tables\": [\n \"<string>\"\n ],\n \"prompt\": \"<string>\",\n \"job_name\": \"<string>\",\n \"federated\": true,\n \"preview\": true\n}"
response = http.request(request)
puts response.read_body{
"query": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"data": {
"start": 123,
"row_count": 123,
"columns": [
"<string>"
],
"next_start": 123,
"data": [
[
"<unknown>"
]
]
},
"error": "<string>"
}{
"error": "<string>",
"code": 500
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
OAuth2AuthorizationCodeBearerAPIKeyHeader
The access token received from the authorization server in the OAuth 2.0 flow.
Headers
Body
application/json
List of the tables involved in the job or query. Format for a single table: .
(For example,public.employees).The input question to generate the query.
Specifies the unique name of the job.
Indicates whether the request selects one or more catalogs.
Specifies whether the query requires a preview.
Response
Ask successful.
The interpreted SQL query generated from the prompt.
A unique ID for the generated query.
The data returned as part of the query response, if applicable.
Show child attributes
Show child attributes
Error message if any issue occurred during query generation.
Was this page helpful?
⌘I

