Overview
This guide will show you how to get started with Sequin. We’ll walk through the full life cycle of an integration: setting up a new sync, reading and writing data, changing your schema, and moving your sync from development to production. In the next several minutes, you’ll build an integration with Airtable. You’ll be able to build the integration using just SQL, and without needing to consider the underlying API’s limitations or rate limits. For this example, imagine your application needs to store all inventory data in Airtable so your company can easily manage and fulfill orders. You can setup a free Airtable account and add this Inventory Tracking template to your workspace to follow along.Create a sync
To get started, you’ll need a Sequin account. If you don’t have one, you can sign up for free. Once you’re logged in, you’ll be taken to the Sequin Console:
- After selecting Airtable as your source, complete the authentication flow to connect your Airtable account to Sequin.
- Select the Airtable base you want to sync, in this case the “Inventory Tracking” template.
- Configure your schema by selecting the tables you want to sync. For now, select the
Product Inventorytable. You can change the tables and columns included in your sync at any time - we’ll cover that later. - To get started, for the destination you can select a pre-configured, Sequin-hosted database. You’ll promote this sync to a database of your choice - perhaps your production database - later.
- After you click “Create”, Sequin will begin syncing your data. You can view the status of your sync in the Sequin Console.
Connect to your database
Now that you’ve created a sync, you can connect to your database and start building your integration. You’ll connect to your database just like any other Postgres database.- You’ll find your connection credentials on the Connection instructions tab of your sync:\

- Use the connection URL or the individual host, port, user, password, and database credentials to connect your database to your SQL client, ORM, or application.
Selecting records
With your database connected, you can start reading and writing data. Get your bearings by selecting all the records from theproduct_inventory table:
record_id for each record is stored in the id column. Run another query to see which product has the most inventory:
where to filter records. For example, to find all products that cost more than $100:
Adding new tables and columns
To make this a bit more interesting, let’s explore ajoin by adding another table to your sync.
You can add new tables and columns to your sync at any time. Sequin will automatically create the table and columns in your database and keep them in sync with your source.
- Go back to the Sequin Console and navigate to the Mapping tab of your sync.
- Select the
Manufacturerstable to include it in your sync. - Now, edit the columns included in your sync. Perhaps you don’t want to include any PII in your database. You can exclude columns from your database by clicking the pencil button and deselecting the columns you don’t want to include - like email, phone number, and address:\

manufacturers table. When the migration completes, you’ll see a new backfill job in the Sequin Console. This backfill job will backfill all the records from the manufacturers table into your database.
Now, when you connect to your database, you’ll see two tables. You can query across these tables with a join:
Insert, update, and delete records
Now that you’re familiar with your database schema, write some data back to your source. You can insert, update, and delete records in your source using SQL. Add a new product to your inventory:Errors
Sequin treats the API you’re syncing from as the source of truth. The business logic defined in Airtable is enforced on your database. For example, if you try to insert a record with an invalidtype, you’ll get an error:
Ship to production
You’ve built your integration and tested it in your your development environment using a Sequin-hosted database. Now you can point your sync to your production database and ship your integration. To do so, update your sync’s destination.- Go back to the Sequin Console and navigate to the Settings tab of your sync.
- Scroll down to the Destination section and click Edit.
- Select Launch or Connect, click the Connect button, and follow the steps for connecting an external database.
Cross schema queries
With your inventory data in your production database, you can now query across your entire database. For example, you can join your inventory data with yourusers table to see which products each user has purchased:

