Skip to main content
A multi-source chart runs a query on each of several data sources and joins the results into one chart. Use it to combine data that lives in different places, such as revenue from Stripe in Basedash Warehouse and accounts from your production Postgres database.
Multi-source charts are in beta and may not be enabled for your organization yet. Contact support@basedash.com to request access.

Overview

A regular chart runs one SQL query against one data source. A multi-source chart has:
  • Source queries: one query per data source, written in that data source’s SQL dialect. Each result gets a name, called an alias.
  • A join query: a DuckDB SQL query that combines the source results by their aliases.
Basedash runs each source query, loads the results into DuckDB in memory, and runs the join query. The chart shows the result of the join query. If the data you want to combine is in one data source, use a regular chart. It’s faster and has fewer limits.

Create a multi-source chart

  1. Open a chart in the chart editor. See Use the chart editor.
  2. Click Add source in the toolbar. The editor switches to tabs: one tab per source query, plus a Join tab.
  3. In each source tab, choose a data source and write a query that returns only the rows and columns you need. Double-click a tab to rename its alias, for example accounts or payments.
  4. Click Add source query to add more sources.
  5. Open the Join tab and write a DuckDB query that combines the sources by alias. The schema sidebar lists the tables available to the join query.
  6. Click Run, then choose the chart type and settings as usual.
For example, with source queries aliased accounts and payments:
To remove a source, select its tab and click Remove selected source.

Limits

  • Up to 8 source queries per chart, from at least 2 different data sources. - Each source query can return up to 50,000 rows and 25 MB. All sources together can return up to 50 MB. - Aliases must start with a letter or underscore and contain only letters, numbers, and underscores (up to 63 characters). - If any source query fails, the chart shows an error instead of a partial result. - Drilldowns and data export aren’t available on multi-source charts.
If a source returns too many rows, you’ll see an error like Source "payments" returned more than 50,000 rows. Aggregate or filter in the source query before joining, for example by grouping payments by customer.

FAQ

Any data sources you can query, including databases, warehouses, and Basedash Warehouse. Each source query uses its own SQL dialect, and the join query always uses DuckDB SQL.
Yes. Each source query runs with your data source access and row-level security, just like a regular chart.
Yes. When multi-source charts are enabled, ask chat or the dashboard chat for a chart that combines data from several sources, and the AI writes the source queries and the join query for you.