Query
query SqlSourcePreview($input: SqlSourcePreviewInput!) {
sqlSourcePreview(input: $input) {
jtdSchema
queryError
records {
columns
rows
}
}
}Variables
{
"input": {
"credentialId": "value",
"dryRun": true,
"sqlQuery": "string"
}
}Response
{
"data": {
"sqlSourcePreview": {
"jtdSchema": "value",
"queryError": "string",
"records": {
"columns": [
"string"
],
"rows": [
"value"
]
}
}
}
}Queries
sqlSourcePreview
Get a preview and infer the schema for a sql query to be used for sql sources. Requires SOURCES_WRITE and SQL_EXECUTION_WRITE permissions. Is in beta and can be changed without notice. Has a timeout of 600 seconds.
QUERY
sqlSourcePreview(input: SqlSourcePreviewInput!): SqlSourcePreviewResponse!Arguments
input
required
Returns
jtdSchema
JsonTypeDefinition
The infered jtd schema.
queryError
String
Errors specific to the query execution, not to be confused with ApiError.
records
Sample of records returned by the sql query.
Query
query SqlSourcePreview($input: SqlSourcePreviewInput!) {
sqlSourcePreview(input: $input) {
jtdSchema
queryError
records {
columns
rows
}
}
}Variables
{
"input": {
"credentialId": "value",
"dryRun": true,
"sqlQuery": "string"
}
}Response
{
"data": {
"sqlSourcePreview": {
"jtdSchema": "value",
"queryError": "string",
"records": {
"columns": [
"string"
],
"rows": [
"value"
]
}
}
}
}