Skip to main content

Mapping data

With Sequin, you can select which tables and columns you sync to your database. You can also rename and lock columns to make working with your data easier. We refer to this process of selecting and customizing which tables and columns you sync as "mapping" the data from the source to your database.

Selecting tables and columns

You can select which tables and columns you sync at anytime in the Select tables section of your sync.

If you would like to select and edit which tables and columns sync to your database, toggle the Sync all tables switch off:

Select tables step

Selecting tables

You can select which tables to sync from your source to your database by simply checking the box next to the tables you want to sync.

As a reminder, you can change which tables you sync to your database at any time.

Select tables step

Selecting columns

If you want to edit the columns that sync from a given table, click the ⚙️ Configure button to open the column mapping modal.

Just like tables, by default we'll sync all the columns from the source. You can pick which columns sync from the source to your database by flipping the switch on the left.

Select tables step

Note: Internal columns, such as id and _sync_updated_at can't be disabled as these are required fields for your sync to function.

Handling new columns

By default we'll sync all the available columns from the source to your database. So when a new column is detected, it will automatically sync to your database.

If you begin selecting which columns you sync by turning some columns off, then new columns will not automatically appear in your database.

Locking columns

You can lock column names to ensure that the column name in your database won't change even if the name in the upstream source changes. This can help insulate your queries and code from name changes.

To Lock or Unlock a column name, click on the 🔓 Lock icon right next to the Database name. The button will turn into solid black indicating that the column is locked.

Locking a column

Alternatively, you can batch Lock all columns or Unlock all columns using the buttons located at the top of the Select columns modal:

Lock/unlock all buttons

By default, all your column names are Unlocked. This means that as soon as a name change is detected in the source, the name of the column in your database will update.

A Locked column name will not change even if the name in the upstream source changes.

Note: Just the name of the column is locked. Data and type changes will still be synced normally with the upstream source.

Renaming columns

Sometimes the default names from your source aren't ideal for your database or code base. For these situations, you can rename the database column. When you rename a database column, the column name will also lock to ensure the name isn't overwritten.

To rename a column, click the ✏️ Edit icon right next to the Database name, then enter a valid name and save it.

Renaming a column

Note: Valid names can't start with a number, have special characters or be a duplicate inside the table.