Tuesday, 7 February 2017

Wave 107: Bindings

Bindings help you create more functional dashboards for the end users.  
Two types of bindings, Results and Selection Bindings.  
Benefit of bindings is that you can use multiple data sets in your dashboards.  
A composite dashboard is combining two datasets. 
We can do this by clipping the lenses to the designer, and then when we go to the dashboard, we can see the lenses from different datasets are seamlessly brought into one palette. 
Concept of Selection binding, binds numbers coming from different datasets.  
As mentioned earlier, the state object is more important object in the JSON and that’s the only one that is mainly edited.  
In each widget, you can see the step drives the widget.  
Sometimes facetting does not work even if they are in the same dimension but different datasets, because they are called different things in each of the datasets. We need to go to the JSON and add filters and pass the name of the widgets in the JSON editor.  

What is the lifecycle of a dashboard? 
Dashboard is created and is created into a Compact form and then its converted into a SAQL and that’s sent to the server which is processed and the result is sent back in the form of JSON.  

Results Binding: 
Sometimes you want to order the queries in a sequence. To chain the execution of the queries you need results binding.  
What if you want to show a breakdown of your top 5 accounts?  
A: use results binding. Go to the lens page and open up the JSON Editor.  Go to the State object and filter a step by the top accounts. This can be done by adding another attribute in the query by filters. We can add an array if the filter and bind it using results binding using the format: {{results(Step Name)}} 

By default if a row limit is not set it chooses the top 2000 rows. If you want to change this there has to be a definition within the query block. Format: "limit" : 5, 
The comma is required.  
Crux is, if you want to run queries in a particular order you have to run results binding.  

No comments:

Post a Comment