Start querying your Airtable base with SQL in 2 minutes.
First, let's connect your Airtable base to Sync Inc:
Create a new account at https://app.syncinc.so/signup.
The first step is to name your resource. To keep it simple, we suggest you reuse your base name from Airtable.
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.
Now, enter the ID for your Airtable base. Again, click our friendly Where do I find this? link if you could use some help finding your base ID on Airtable's REST API site.
Last, enter the names of the tables in the base. Do this for each and every table in your base. Please enter the name of the table exactly as it appears in Airtable:
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.
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 again) and click Create.
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:
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.