Tips and tricks

When you want to quickly test whether a certain visualization is suitable for your needs, but you don't have the time to create the long and complex query that will provide you the necessary results in the format the visualization expects, you can simply mock the result set and do your quick and dirty test.

Here is an example, Suppose I want to test the funnel visualization. I know that the funnel expects a column for the Funnel Steps and another column for the Funnel Step Value. I select the internal Redash data source, called Redash metadata (no worries, we don't need anything from the data in the data source itself), and execute the following query:

SELECT 'Bought Stop Watch' AS fun_step,
10000 AS
VALUES
UNION
(SELECT 'Bought Running Shoes' AS fun_step,
8000 AS
VALUES)
UNION
(SELECT 'Bought Running Shorts' AS fun_step,
7500 AS
VALUES)
UNION
(SELECT 'Bought Running Shirt' AS fun_step,
5500 AS
VALUES)
UNION
(SELECT 'Started Running' AS fun_step,
3000 AS
VALUES)

Please note that this is just a mockup query; it doesn't use any tables, and it just creates five records with static values:

However, it's more than enough to create and test our Funnel visualization:

Funnel visualization

Now, we can get the feel of the visualization we want to test, as well as the ability to place it in a dashboard, and see if it helps our insights.

Here is another example of a mockup query for Map (Markers). The query is simply hardcoded with the latitude/longitude of four randomly selected cities:

SELECT 32.0853 AS lat,
34.7818 AS lon,
'Tel Aviv' AS city
UNION
(SELECT 37.9838 AS lat,
23.7275 AS lon,
'Athens' AS city)
UNION
(SELECT 40.8518 AS lat,
14.2681 AS lon,
'Napoli' AS city)
UNION
(SELECT 19.0760 AS lat,
72.8777 AS lon,
'Mumbay' AS city)

This is the dataset that you should get when executing the query:

And this is what the map visualization will look like, based on the preceding dataset:

Map Visualization on the dataset

Don't be afraid to experiment with your own mockups. Redash is a very powerful (yet simple) tool that allows you to move faster when designing and building dashboards.

A very useful resource for up-to-date tips and tricks from the Redash community can be found here: https://discuss.redash.io/c/tips-tricks-query-examples.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset