The SQL Console app is our first native Airtable app. It allows you query all the data in your base using SQL - all inside Airtable!
The SQL Console is available in the Airtable Marketplace (Soon!). Here is how to install the app:
- Open the Airtable base that you want to add the SQL Console to.
- Click the APPS button in the top right corner. Then click the + Add an app button.
- Search for the SQL Console app. You should just need to type SQL into the search bar.
- Click the blue Add app button and the SQL Console will be added to your base.
- The first step is to provide us with your Airtable API key. Click the the Where do I find this? link if you need a little help finding your API key on your Airtable account page.
- Click Continue
- Start querying!
Check your email! We'll send an email to the email address associated to your Airtable account with details on how to finish setting up your Sequin account so you can access the Postgres database powering the SQL Console. If you didn't receive this email, first check your spam and then send us a note in Intercom.
If you have already added the SQL Console to a base or already have a Sequin account, we add two steps to the process to protect your security. Here is how to add the SQL Console to more bases:
- Enter your Airtable API key. Click the the Where do I find this? link if you need a little help finding your API key on your Airtable account page.
- Click the link to get an App Key from the Sequin console. Copy and paste the App Key and then click Continue.
Note: you can always find your App Key by clicking your account icon in the upper right corner of the console.
- If this base has not been added to Sequin, you'll be instructed to add the base to Sequin from the console. Click the link to add the base. If you need any help adding the base, read our quickstart guide. Once the base is added to the console, click Continue.
- Start querying!
The SQL Console executes your SQL statement on a Postgres database containing all the data in your base. You can execute any valid SQL statement supported by PostgreSQL.
Keep in mind, that depending on your query, a SQL statement can take several seconds to resolve.
To see how your Airtable base is represented in Postgres, click the Schema button. You'll see all the tables, columns, and data types for your base.
You can learn more about how your data will look in Postgres in the Reference section of these docs.
You can write any valid query supported by PostgreSQL.
You'll see that the SQL console support full SQL syntax highlighting and type ahead to make writing queries familiar. On that note, you can press ⌘⏎ (COMMAND + ENTER) to execute a query.
If your query contains an error, you will see the error returned from the database with some helpful hints (i.e. the location of the error).
Check out our cheat sheet for some tricks.