Combine Query Results from Different Data Sources

We often have data in more than one primary data source.
Currently, we’re able to create a dataset for each source, and then pin the output from each source onto a common dashboard.

Example: 4 systems (and therefore 4 data connections), and you want a single report with usage statistics for all 4 systems. Currently you can create 1 dashboard with 4 reports, but not a single report.

There are several was this could be achieved, and without a doubt there will always be a limitation, but the approach Redash takes is pretty neat - you create a ‘data source’ which allows you to query the internal database, allowing you to merge the results of multiple separate queries into one query.

Here is roughly how that looks in Redash to give you an idea of how we use it…

SELECT 
    S.SystemDate
    ,S.Usage System1_Usage
    ,B.Usage System2_Usage
    ,C.Usage System3_Usage
    ,D.Usage System4_Usage
    ,E.Usage System5_Usage
    ,F.Usage System6_Usage

FROM query_325570 S
JOIN query_325561 B ON S.SystemDate = B.SystemDate
JOIN query_325559 C ON S.SystemDate = C.SystemDate
JOIN query_325571 D ON S.SystemDate = D.SystemDate
JOIN query_325572 E ON S.SystemDate = E.SystemDate
JOIN query_329607 F ON S.SystemDate = F.SystemDate

We then use this query to create our report