Visualizations based on smaller and simpler datasets can use a query that fetches all the data in a single
GET request to the Data Lens REST API. However, when working with a dataset which is more complex or consists of several gigabytes of data, this method may not be practical. It would be more efficient for the query to retrieve only the data that is required for the current viewport.
To do this, we define the query to get the data from the dataset dynamically. That is, the data will be retrieved in subsets after being filtered server-side, according to the parameters in the query's
GET request URL. Instead of retrieving all data rows in one action, we only retrieve the data rows that we actually need for each layer in the visualization.
The following is an example of a heat map created with Data Lens which displays mobile network events in the US. In the example, we filter the data using a query with dynamic parameters. Click the image to view the full code for this example.