All Collections
Connected Sheets
Querying data from a workbook
Querying data from a workbook

How to pull information from any datasource into a workbook

Abbey Lauren Minondo avatar
Written by Abbey Lauren Minondo
Updated over a week ago

To bring live data into your spreadsheet for analysis, you'll need to connect to and query your datasource from a sheet in your workbook. Before you get started, ensure that you have at least one datasource configured for your workspace (more on that here).

Getting started

Start by creating a workbook and opening the "Connections" sidebar from the toolbar.

Once you've opened "Connections" click "Connect Datasource" and choose the datasource you'd like to connect.

Next you'll be asked if you want to use the query builder or SQL editor to pull data. The query builder is a no-code way of pulling information, the SQL editor will allow you to write traditional SQL.

Query builder

If you don't know SQL and want to access your data, you can do so with this option. Search for tables or columns from the first drop down. Checking boxes will select columns.

You can drag and drop column names from the sidebar to reorganize your data. You can also apply limits or sorts.

If you want to pull data from two different tables or datasources in one sheet, you can use our query builder join functionality to do so.

Once you have the selection to your liking, press "Run Query" to see your data populate the sheet.

SQL editor

Writing traditional SQL in Equals is made easy with the table browser available for all connections. Just select the πŸ” icon and search for a table name or column. You can always preview your data by hovering over the πŸ‘ icon.

Once you have written your query, press "Run Query" to see your data populate the sheet.

Switching between interfaces

To switch a specific connection from the Query Builder to the SQL Editor click the "<>" icon. Switching from the Query Builder to the SQL Editor will reveal the query in SQL syntax. Note that this will affect all users looking at this connection.

To switch a specific connection from the Query Builder to the SQL Editor click the "{...}" icon. Switching from the SQL Editor to the Query Builder will cause you to lose your query, as we can not translate a handwritten SQL query into the builder interface. Note that this will affect all users looking at this connection.

Set a default interface

You can choose in your user settings whether you'd prefer new connected sheets to use the Query Builder or the SQL Editor by default. To get to your user settings click your avatar from the Equals home screen and choose "Settings" in the dropdown menu.

Scheduling queries

You can automatically pull new data into Equals either once a day or once a week. When the scheduled query runs it will update all formulas that depend on the updated data. To schedule a query click "Schedule" below the "Run Query" button in the Connections sidebar.

You can also schedule all the connections in a workbook to update together. To schedule all connections, go to the "All Connections" tab in the Connections sidebar.

Query notifications

You can enable or disable notifications for query runs by clicking on the πŸ”” icon revealed after scheduling a query. This must be done on a sheet-by-sheet basis.

Restoring a previous query

Equals keeps a copy of every query and the resulting data that was returned from the query. To restore a previous query run, click on the ⏱ icon to the right of your datasource name in the query console (if you're in the SQL Editor, click on the πŸ” icon and select "Version History").

From there you can choose a previous version of the query. If you click "Restore" we will restore the previous query that was run and the data the query returned at the time it was originally run. You can also choose to restore only the query itself, in which case a query run will not complete and only the query syntax will change.

Did this answer your question?