Skip to main content
Most sources are also tables you can query with SQL, including joins across sources and against your own connected sheets. See Connected data. You can run queries in Data Studio in the dashboard, send them to the API, or read their results from DuckDB, and all three use the same engine. That engine is DuckDB, so DuckDB’s SQL dialect and functions apply. Queries are billed per row returned, at each row’s source rate, so use LIMIT. See Plans and credits.

Querying in Data Studio

You can write and run a query in Data Studio without writing any code. Select the sources you want in the Sources list, and Data Studio writes a query for them in the SQL editor of the Query panel. Selecting or clearing a source replaces the query in the editor, so choose your sources before you edit it. You can also start from one of the Examples or write your own, then click Run.
Data Studio: a Sources list of tables with checkboxes beside a Query panel, with the comparison query in the SQL editor and a Run button.
To see a table’s columns, click its name in the Sources list. To search for a word instead of writing SQL, enter it in the search box in the Query panel. Data Studio will write a query that looks for it in each selected source. The rows appear under Results. The Request view shows the same query as an API call in curl, Python, or JavaScript. The DuckDB view shows it as a URL you can read from DuckDB, and lists your recent queries from DuckDB with what each one cost. See Query from DuckDB.

Querying from the API

Send a single SELECT statement. Table names are the source names, and you can join a connected sheet in by passing its id and referencing it by its alias.

Run a SQL SELECT across the datasets

The endpoint, request body, and example responses.

Run SQL against one connected sheet

Query a single sheet on its own, without the public sources.

Limits

Data Studio and the API apply the same limits. The hosted engine queries Dataville’s tables and your connected sheets. It cannot read files or URLs. To join a query’s result with your own files, run the query from DuckDB on your own machine. See Query from DuckDB.