Enable an Airtable SQL Export

Enable an Airtable SQL Export
Export Airtable data with SQL in a single API call.

With CSV Getter, you can export Airtable data in a single API call. Now you can use SQL to obtain more refined data from just one HTTP request.

This guide will show you how to setup a dynamic SQL export endpoint for your Airtable data. If you prefer videos to articles, here is a link to our Youtube demo:

Query Airtable data with SQL - Youtube

Setting up an Airtable export URL with CSV Getter is easy. Simply login to CSV Getter select your plan and connect your Airtable data. If you would like to trial the tool before connecting your own data, try out our open sandbox.

Now you have setup a link for exporting Airtable data you can pass SQL into the URL as a query parameter. If you are unsure how to obtain your export URL, it can be found by pressing View Export URL on the URL builder screen.

Circled - view export URL

This URL will serve as the base table you will be querying with SQL. The table that a URL exports by default will always be referred to in the SQL as csvgetter. For example, if you would like to select the top 5 rows of your data in your export, you would use the following SQL:

select * from csvgetter limit 5

And so, your URL would look as follows:

SQL param example

Rather than returning the full result of your export URL, this parameter will limit the results to the top 5 rows. Below is an example of this in the app Postman.

sql as url param postman

Notice how SQL can often contain special characters, which may not be "URL friendly". To ensure your SQL is always read accurately, you can pass it into a URL encoder before using in your processes.

encoded sql example

This will ensure your URL is robust.

If you are familiar with SQL, you will know that there are now a lot of read operations you could do on your Airtable export. In our docs, we have displayed more examples.