Skip to main content

Google Calendar Migration Guide

Upgrading to 1.0.0​

When Calendar Id is empty, version 1.0.0 reads every calendar in the account's calendar list, including hidden ones: events from the calendars the account can read, acl from those it owns, and freebusy from all of them. It adds the acl and freebusy streams, and changes the events, calendars and colors streams.

Risk of permanent data loss

Clearing the events stream deletes its destination rows and re-reads only what Google still returns. Events last modified before your Start Date are not re-read, events deleted in Google Calendar come back with at most their ID and a cancelled status (or not at all), and with an Append sync mode every earlier copy of each event is lost. Before you clear it: back up the events table if you need that history, and if Start Date is set, empty it (or move it earlier) so the re-read covers every event Google still returns — Google serves live events of any age; only Start Date limits the re-read. Restore Start Date after the first sync if you want it.

events​

Because one events stream can now hold events from several calendars, these things change for it:

  • Primary key. The primary key changes from id to [calendar_id, id]. Google keeps event ids unique per calendar only, and a meeting has the same id on the organiser's calendar and on each invitee's calendar. With id alone, Append + Deduped would keep one of those rows and drop the others.
  • calendar_id values. calendar_id now holds the calendar's real ID. Connections configured with the alias primary get the account's email address instead of the word primary, so the column joins to calendarlist.id.
  • Date and timestamp types. created, updated, and the dateTime fields of start, end and originalStartTime are typed as timestamps. start.date, end.date and the new originalStartTime.date are typed as dates.
  • State format. The saved events cursor moves to a format that covers all calendars. Version 1.0.0 does not read a cursor saved by 0.1.0, so the first incremental sync after the upgrade re-reads every event since the Start Date, or every event if Start Date is empty.

Connections that set Calendar Id keep syncing that one calendar. To sync every calendar instead, empty the field before you clear events, so the clear re-reads every calendar. If you empty it later, clear events again: otherwise an incremental sync reads only events changed after the switch from the other calendars.

With Calendar Id empty, events reads only the calendars the account can read events from, and acl only the calendars it owns. Calendars shared with the account as free/busy only are read by freebusy alone.

calendars​

calendars used to return the same calendar-list entries as calendarlist. It now returns the calendar resource of each calendar in the calendar list that the account can read, hidden ones included: kind, etag, id, summary, description, location, timeZone, conferenceProperties, dataOwner, autoAcceptInvitations and labelProperties. Hidden calendars are now included, and calendars shared with the account as free/busy only are no longer returned. These columns are removed from calendars and stay in calendarlist: accessRole, backgroundColor, foregroundColor, colorId, defaultReminders, notificationSettings, primary and selected.

colors​

The primary key changes from [calendar, event], two objects keyed by color ID, to kind. The stream returns one record. Its updated field is typed as a timestamp.

Update downstream queries​

  • Queries that filter events.calendar_id = 'primary' stop matching. Filter on the account's email address instead.
  • Once events reads more than one calendar, events.id is no longer unique. Joins, uniqueness tests and deduplication logic must use (calendar_id, id).
  • Queries that read accessRole, backgroundColor, foregroundColor, colorId, defaultReminders, notificationSettings, primary or selected from calendars must read them from calendarlist.

acl scope​

The new acl stream needs the calendar.acls.readonly scope, unless your refresh token already has calendar.acls or calendar. Generate a new refresh token for your OAuth client that includes the scope and paste it into Refresh token, or leave acl deselected. If your connection adds new streams automatically, deselect acl until the token has the scope; otherwise every sync fails.

Refresh schemas and clear data​

Clear events, calendars and colors on every connection, whether or not Calendar Id is set: the primary keys widen (events, colors), existing columns change type (events, colors), calendars changes columns, and version 1.0.0 drops the 0.1.0 events cursor. Destinations differ on whether they can apply key and type changes in place, so a clear is the only path that works everywhere; connections using the alias primary would otherwise also keep old primary rows beside the new email-address rows.

  1. Select Connections in the main navbar and select the connection(s) affected by the update.
  2. Select the Schema tab.
    1. Select Refresh source schema to bring in any schema changes. Any detected schema changes will be listed for your review.
    2. Select OK to approve changes.
  3. Select Save changes at the bottom of the page.
    1. Ensure the Clear affected streams option is checked to ensure your streams continue syncing successfully with the new schema.
  4. Select Save connection.

This clears the data in your destination for the affected streams. After the clear succeeds, trigger a sync by clicking Sync Now. For more information on clearing your data in Airbyte, see this page.

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.

  1. 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.

  2. Edit the entry for the connector you want to pin.

  3. 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.

  1. 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.

  2. Find the connector you want to update in the list of connectors.

    note

    Airbyte lists two versions, the current in-use version and the latest version available.

  3. 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.

  1. 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.

  2. Select the instance of the connector you wish to upgrade.

  3. Select Upgrade.

  4. 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.

  1. In the nav bar, click Connections.

  2. Find the connection affected by the upgrade.

  3. Click the Schema tab.

  4. Click Refresh source schema (looks like ). When Airbyte finishes, it shows you any detected schema changes.

  5. Click OK.

  6. Click Save changes

  7. Clear the data for the streams affected by this upgrade.

Once the clear is complete, you can begin syncing your data again as usual.