In 2 minutes, you will sync all your Airtable data to a Postgres database and begin querying your base with SQL.
First, let's connect your Airtable base to Sync Inc:
(For this quickstart, we'll be using the Inventory Tracking template. Feel free to join along or use another great sample from the Airtable Universe!)
Create a new account at https://app.syncinc.so/signup.
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.
After you click Start syncing, we'll immediately connect to Airtable and begin syncing with your base.
For most Airtable bases, the sync will complete in a couple seconds. For larger bases of around ~10,000 records, the sync might take around 30 seconds to complete.
Now that your database is setup, you can connect to it.
Sync Inc provisioned you a Postgres database. You can connect to your database in all the ways you're used to. For this guide, we'll use TablePlus, which supports both macOS and Windows.
TablePlus is in alpha for Linux. If you're a Linux user, we recommend you check out DBeaver as a great alternative.
Download and install TablePlus from https://tableplus.com/.
Open TablePlus and click Create a new connection...
Click the Import from URL button.
Copy and paste the Connect URL from Sync Inc into the Connection URL in TablePlus then click Import.
Then simply name your your TablePlus connection (we recommend reusing the name of your Airtable base) and click Create.
That's it!
You'll now see your entire Airtable base represented in Postgres tables!
Note that we convert your table names to snake_case
(i.e lowercase words delineated by an underscore). So what was Product Inventory
in Airtable is now product_inventory
in your database.
To start querying, click the SQL button and have at it. For instance:
SELECT sum(revenue) AS "Gross Revenue" FROM sales_orders;
You can now query all your Airtable data with full fledged SQL: SELECT
, JOIN
, UNION
and more. And because your data is now in a Postgres database, you can connect to your data using a variety of tools and programming languages.
From here, check out our Cheat Sheet for quick tips on how to query your Airtable base in SQL.
Read our Query docs to learn more about how we make Airtable work with SQL.