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": [
{}
]
}
}Required capabilities:
transformationsAcl:READ
Preview a SQL query.
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": [
{}
]
}
}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.
Query object to run a query to preview results.
SQL query to run for preview.
Stringify values in the query results.
End-result limit of the query.
Limit for how many rows to download from the data sources.
Limit for how many rows that are used for inferring schema. Default is 10,000.
Number of seconds to wait before cancelling a query. The default, and maximum, is 240.
Was this page helpful?