> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mindsdb.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Airtable

This is the implementation of the Airtable data handler for MindsDB.

[Airtable](https://www.airtable.com/lp/campaign/database) is a platform that makes it easy to build powerful, custom applications. These tools can streamline just about any process, workflow, or project. And best of all, you can build them without ever learning to write a single line of code.

## Prerequisites

Before proceeding, ensure the following prerequisites are met:

1. Install MindsDB locally via [Docker](/setup/self-hosted/docker) or [Docker Desktop](/setup/self-hosted/docker-desktop).
2. To connect Airtable to MindsDB, install the required dependencies following [this instruction](/setup/self-hosted/docker#install-dependencies).
3. Install or ensure access to Airtable.

## Implementation

This handler is implemented using `duckdb`, a library that allows SQL queries to be executed on `pandas` DataFrames.

In essence, when querying a particular table, the entire table is first pulled into a `pandas` DataFrame using the [Airtable API](https://airtable.com/api). Once this is done, SQL queries can be run on the DataFrame using `duckdb`.

The required arguments to establish a connection are as follows:

* `base_id` is the Airtable base ID.
* `table_name` is the Airtable table name.
* `api_key` is the API key for the Airtable API.

## Usage

In order to make use of this handler and connect to the Airtable database in MindsDB, the following syntax can be used:

```sql theme={null}
CREATE DATABASE airtable_datasource
WITH
  engine = 'airtable',
  parameters = {
    "base_id": "dqweqweqrwwqq",
    "table_name": "iris",
    "api_key": "knlsndlknslk"
  };
```

You can use this established connection to query your table as follows:

```sql theme={null}
SELECT *
FROM airtable_datasource.example_tbl;
```

<Warning>
  At the moment, only the `SELECT` statement is allowed to be executed through `duckdb`. This, however, has no restriction on running machine learning algorithms against your data in Airtable using the `CREATE MODEL` statement.
</Warning>
