Aircall Migration Guide
Upgrading to 1.0.0
callsAircall's API returns only the last six months of calls. Clearing calls, or switching it from an append mode to any Overwrite mode, deletes every older call for good: a re-sync can't restore it. Copy the calls table before you do either.
Version 1.0.0 adds primary keys for deduplication, makes numbers and teams full refresh only, and declares the types the Aircall API reference documents. The values Aircall returns don't change.
What changed
| Stream | Change |
|---|---|
calls | New primary key id. contact, assigned_to, transferred_by and transferred_to change from string to object. Inside the existing object and array columns, number.priority is declared as an integer and user.created_at, number.created_at, teams[].created_at, comments[].posted_by.created_at and tags[].tagged_by.created_at as date-times. |
contacts | New primary key id. |
webhooks | Primary key changes from id to webhook_id, the UUID Aircall now uses to identify webhooks. |
numbers | Full refresh only; incremental sync is removed. priority changes from string to integer. |
teams | Full refresh only; incremental sync is removed. users[].created_at is declared as a date-time inside the users column. |
users | created_at changes from string to timestamp. |
company still has no primary key, because Aircall returns a single company object with no identifier.
Neither the numbers nor the teams endpoint filters by update time, so their incremental mode re-read every record on every sync and added duplicates of every number and team.
Who needs to act
Connections that sync none of the six streams above need no action. All other connections refresh the source schema. Whether anything else is needed depends on the destination and the sync mode, as the steps below say.
Before you upgrade
On ClickHouse, converting an existing users.created_at column to a timestamp sets its values to null. If users uses Full Refresh | Append, copy the users table or switch the stream to Full Refresh | Overwrite before the first 1.0.0 sync. If the connection propagates field changes automatically, do this before you upgrade.
Steps
- Upgrade the connector to 1.0.0.
- In the connection, open Schema and select Refresh source schema, then review and save. If Airbyte recommends clearing or refreshing streams when you save, save without clearing
callswhen it uses an append mode: a refresh re-reads six months of calls into the table. Connections that propagate field changes automatically apply the type changes on their own, but pause until you review the schema if a deduplicated stream's primary key changes. numbersandteamsthat used an Incremental mode (after the refresh they can showFull Refresh | Append): selectFull Refresh | OverwriteorFull Refresh | Overwrite + Deduped. The next sync replaces the table, duplicates included, and drops numbers and teams that were deleted in Aircall: copy the table first if you need them. Ifnumbersorteamsalready usedFull Refresh | Appendto keep snapshots, you can leave them there; switching them to an Overwrite mode deletes the earlier snapshots.- Streams in
Full Refresh | OverwriteorFull Refresh | Overwrite + Deduped: nothing else to do. The next sync rebuilds the table with the new keys and types. On MSSQL the columns are changed in place instead; see the MSSQL note below. callsin any append mode (Full Refresh | Append,Incremental | AppendorIncremental | Append + Deduped): the table can hold calls older than six months. Follow If you keep an append-mode calls table for your destination.- To deduplicate
callswith the new key, selectIncremental | Append + Deduped: it keeps every row. Don't switch an append-modecallstable to an Overwrite mode (see the warning above). Forcontactsandwebhooks,Full Refresh | Overwrite + Dedupeddeduplicates; on an append-mode table it also drops records that were deleted in Aircall. - On S3 Data Lake or GCS Data Lake, which reject these type changes in place: copy and then clear
numbersandusersif they useFull Refresh | Append, because the clear deletes the snapshots of earlier syncs; and copy and clearcallsbefore you switch it toIncremental | Append + Deduped. - Run a sync.
If you keep an append-mode calls table
Before 1.0.0, the Bulk CDK destinations wrote the four calls fields that become objects as JSON text.
-
Snowflake: the schema refresh changes these columns from
VARCHARtoOBJECT, which Snowflake can't do for the existing text, so the next sync fails (inIncremental | Append + Deduped, at the end of the sync). Before the first 1.0.0 sync, either convert each of the four columns yourself (try it on a copy first:CREATE TABLE CALLS_COPY CLONE CALLS), or copy the table and clearcalls. To convertCONTACT, for example:ALTER TABLE CALLS ADD COLUMN CONTACT_OBJECT OBJECT;UPDATE CALLS SET CONTACT_OBJECT = TRY_PARSE_JSON(CONTACT)::OBJECT;ALTER TABLE CALLS DROP COLUMN CONTACT;ALTER TABLE CALLS RENAME COLUMN CONTACT_OBJECT TO CONTACT; -
BigQuery and Postgres: the columns become
JSONandJSONB, and existing rows keep the old values as JSON strings. Convert them in place after the first 1.0.0 sync, for each of the four columns:-- BigQueryUPDATE calls SET contact = SAFE.PARSE_JSON(JSON_VALUE(contact)) WHERE JSON_TYPE(contact) = 'string';-- PostgresUPDATE calls SET contact = (contact #>> '{}')::jsonb WHERE jsonb_typeof(contact) = 'string'; -
Redshift, and ClickHouse with the JSON type: existing values are parsed into
SUPERorJSON; no action. -
MSSQL: the four columns become
TEXT, changed in place in every sync mode. Cast them toNVARCHAR(MAX)in queries that useJSON_VALUE,=,GROUP BYorORDER BY. -
MotherDuck: append modes keep the existing text columns, so old rows hold DuckDB struct text and new rows JSON text.
Full Refresh | Overwriterebuilds them asJSONandusers.created_atas a timestamp. -
Databricks, ClickHouse without the JSON type, S3 Data Lake, GCS Data Lake, and CSV or JSONL files on S3, GCS or Azure Blob Storage: no change for these four fields.
-
Avro or Parquet files on S3, GCS or Azure Blob Storage: new files use integer and timestamp types for
priorityand thecreated_atfields above. In append modes, update table definitions that read the whole prefix, or copy and clear.
Update downstream queries
users.created_atis a timestamp column on typed destinations (on MotherDuck, after an Overwrite rebuild). Queries that treat it as text (string comparisons,LIKE,SUBSTR, parsing) must treat it as a timestamp.calls.contact,calls.assigned_to,calls.transferred_byandcalls.transferred_toare JSON or object columns on BigQuery, Snowflake, Redshift, Postgres, ClickHouse with the JSON type, and MotherDuck after a rebuild; queries must read them as objects.numbers.priorityis an integer column: compare it with0and1, not'0'and'1'. The nestedcalls.number.priorityandcreated_atvalues already arrived as numbers and ISO text inside JSON columns; only Avro and Parquet files change their types.- Models that join
webhooksonidshould join onwebhook_id. - Models that remove duplicate
numbersorteamsrows from append-mode tables can drop that step once the tables are rebuilt.
Roll back
Pinning the connector back to 0.6.0 after this migration reverses the type changes and drops the new keys: refresh the schema again, and copy calls before any clear. On S3 Data Lake and GCS Data Lake, append-mode numbers and users tables then reject the reverse changes, so copy and clear them. On other destinations, users.created_at comes back as text in the warehouse's timestamp format, not the original ISO text.
Connector upgrade guide
Review the following information to prepare for and execute your upgrade.
Review the changelog
Before updating a connector, review the changelog to understand the changes and their potential impact on your existing connections. Find the changelog for any connector by navigating to the bottom of the documentation for that connector. Major version releases also include a migration guide.
Plan for major updates
Major updates may require you to adjust connection settings or even make changes to your data pipelines. Allocate enough time and resources for this. Use the migration guide to ensure your transition process goes smoothly.
Airbyte provides tooling that guarantees safe connector version bumps and enforces automated version bumps for minor and patch updates. You always need to manually update for major version bumps.
Self-managed plans: pin a specific version if you can't update
If you're unable to upgrade to the new version of a connector, you can pin that connector to a specific version.
-
In the navigation bar:
-
If you're on the Self-Managed Enterprise plan, click Organization settings > Sources/Destinations.
-
If you're on any other plan, click Workspace settings > Sources/Destinations.
-
-
Edit the entry for the connector you want to pin.
-
Set the Default Version to the version you want to use.
Self-managed plans: update the local connector image
If you self-manage Airbyte, you must manually update the connector image in your local registry before proceeding with the migration. Follow the steps below.
-
In the navigation bar:
-
If you're on the Self-Managed Enterprise plan, click Organization settings > Sources/Destinations.
-
If you're on any other plan, click Workspace settings > Sources/Destinations.
-
-
Find the connector you want to update in the list of connectors.
noteAirbyte lists two versions, the current in-use version and the latest version available.
-
Click Change to update your OSS version to the latest available version.
Update the connector version
Update each instance of the connector separately. If you have multiple instances of a connector, updating one doesn't affect the others.
-
In the navigation bar:
-
If you're on the Self-Managed Enterprise plan, click Organization settings > Sources/Destinations.
-
If you're on any other plan, click Workspace settings > Sources/Destinations.
-
-
Select the instance of the connector you wish to upgrade.
-
Select Upgrade.
-
Follow the prompt to confirm you are ready to upgrade to the new version.
Clear data from affected streams
After upgrading a connector with a breaking change, you must refresh affected schemas and clear your data.
-
In the nav bar, click Connections.
-
Find the connection affected by the upgrade.
-
Click the Schema tab.
-
Click Refresh source schema (looks like ). When Airbyte finishes, it shows you any detected schema changes.
-
Click OK.
-
Click Save changes
-
Clear the data for the streams affected by this upgrade.
Once the clear is complete, you can begin syncing your data again as usual.