Hi,
I am using rest api for querying the dataset. In the request for /sql we have
{
“sql” : “”,
“context”:[]
}
Do you provide any options for querying the dataset with aggregate functions with dimensions and measures in rest api?
eg:
{
“sql”:""
“dimensions”:[],
“measures”:[]
}
Also i have looked into data reflections. The concept of data reflections is to accelerate the query and refresh the data. Am i right?
Can the data reflections be used to query the dataset with dimensions and measures?
Your earliest reply will help me a lot! Thanks in advance!
Out of curiosity - what do you hope to achieve by explicitly specifying the dimensions/measures in the query? You are right - data reflections are used to accelerate the query and can by used with dimensions and measures. However, you do not need to specify it from the query itself. Dremio’s query planner is smart enough to know when you have a reflection that can help solve a query’s plan, and it will then intelligently select the reflection, transparent to the end user.
You do have the option of selectiong dimensions/measures for what we call an “Aggregation Reflection”. More info here or here.
Thanks for the reply. In the query editor we have group by option and we can add dimension and measure and we can get the result dataset. Im asking whether those kind of queries can be implemented with rest api!
Ah - If you are referring to the Group By icon on the left side of the screen between Add Field and Join, that is a feature where we can automatically generate aggregation SQL for you via data curation which is available in our UI only. After the SQL is generated in the UI, it is exposed and can be used via REST API.