Skip to main content
POST
/
transformations
/
query
/
run
Python SDK
query_result = client.transformations.preview(query="select * from _cdf.assets")

df = client.transformations.preview(query="select * from _cdf.assets").to_pandas()

result = client.transformations.preview(query="select * from my_raw_db.my_raw_table", limit=None)
print(result.results)

result = client.transformations.preview(query="select * from my_raw_db.my_raw_table", limit=None, source_limit=None)
print(result.results)
{
  "schema": {
    "items": [
      {
        "name": "<string>",
        "sqlType": "<string>",
        "type": {
          "type": "<string>"
        },
        "nullable": true
      }
    ]
  },
  "results": {
    "items": [
      {}
    ]
  }
}

Authorizations

Authorization
string
header
required

Access token issued by the CDF project's configured identity provider. Access token must be an OpenID Connect token, and the project must be configured to accept OpenID Connect tokens. Use a header key of 'Authorization' with a value of 'Bearer $accesstoken'. The token can be obtained through any flow supported by the identity provider.

Body

application/json

Query object to run a query to preview results.

query
string
required

SQL query to run for preview.

convertToString
boolean
required

Stringify values in the query results.

limit
integer<int32>

End-result limit of the query.

sourceLimit
integer<int32>

Limit for how many rows to download from the data sources.

inferSchemaLimit
integer<int32>

Limit for how many rows that are used for inferring schema. Default is 10,000.

timeout
integer<int32>

Number of seconds to wait before cancelling a query. The default, and maximum, is 240.

Response

Response with resulting rows from the query.

Response object containing result schema and data.

schema
object
required
results
object
required

Query result in json format.

Last modified on April 23, 2026