With the PlanetScale Connect (beta), you can extract data from your PlanetScale database and safely load it into other destinations for analysis, transformation, and more.
We implemented an Airbyte connector as the pipeline between your PlanetScale source and selected destination. This document will walk you through how to connect your PlanetScale database to Airbyte.
Connect to Airbyte
Only Airbyte Open Source supports the PlanetScale data source. In this section, you'll learn how to set up Airbyte and connect your PlanetScale source.
- A PlanetScale database
- Docker Desktop (Docker terms apply)
Set up Airbyte locally
Install Docker Desktop.
Clone the Airbyte repo and run Docker:
git clone https://github.com/airbytehq/airbyte.git cd airbyte docker-compose up
Open Airbyte in the browser at http://localhost:8000.
Set up PlanetScale source
Now that Airbyte is running locally, let's set up the custom PlanetScale source.
- In the Airbyte dashboard, click "Settings" on the bottom left.
- Click "Sources" on the left sidebar.
- Click the "New connector" button.
- Fill in the connector values as follows:
- Connector display name: PlanetScale
- Docker repository name: planetscale/airbyte-source
- Docker image tag:
- Connector Documentation URL: https://planetscale.com/docs/integrations/airbyte
You can find the PlanetScale Airbyte Source Dockerhub release page here.
Fill in PlanetScale connection information
You're now ready to connect your PlanetScale database to Airbyte.
In the PlanetScale dashboard, head to the organization Settings page by clicking your organization > "Settings" > "Beta features" (
Find and click the "Enroll this organization in the Connect beta" checkbox and save your changes.
Click on the database and branch you want to connect to.
Click "Connect", select "General" from the "Connect with" dropdown.
Leave this tab open, as you'll need to copy these credentials shortly.
Back in Airbyte, click "Sources" in the main left sidebar > "New source".
Select the new PlanetScale source you created from the dropdown.
Fill in the "Set up the source" values as follows:
- Name: Any name of your choice
- Source type: Select "PlanetScale"
- Host: Paste in the copied value for
- Database: Paste in the copied value for
- Username: Paste in the copied value for
- Password: Paste in the copied value for
- Shards: Sharding is only supported on our Enterprise plan. Please reach out to us for more information.
Click "Set up source" to connect.
You should get a success message that the connection test passed.
Choose your destination
With the connection complete, you can now choose your destination.
- Click "Destinations" in the sidebar or the "New destination" button on the source connection page.
- Set up the destination you want to sync your data to.
Each destination should have a Setup Guide linked on its destination setup page.
Choose your sync frequency
Next, you need to choose how often you want to sync your PlanetScale data to this destination.
Choose your PlanetScale source as the "Source connector".
Select the destination you want to sync your PlanetScale data to.
Choose a sync frequency, which is how often we will connect to your PlanetScale database to download data.NoteImportant: The sync frequency will affect your PlanetScale billing. The rows read during sync are counted toward your database rows read, so if you choose "Full refresh", you will be billed for full table reads of all tables selected every time the sync runs.
You can find more information about your plan's read limits in our Billing documentation.Note
Choose the Destination Namespace configuration from the dropdown. This is where the data will be stored in the destination.
(Optional) Choose your destination stream prefix.
Select the data you want to sync. You should see a list of table names. You can select all or choose which ones to sync individually.
Choose what type of sync mode you'd like to use for each source table.
- Incremental — Incremental sync pulls only the data that has been modified/added since the last sync. We use Vitess VStream to track the stopping point of the previous sync and only pull any changes since then.
- Full refresh — Full refresh pulls all data at every scheduled sync frequency. This will lead to a higher rows read count than Incremental sync. For more information, see the billing section of this doc.
Click "Set up connection".
- In the Airbyte dashboard, click "Destinations" > "Settings".
- Click "Refresh source schema".
- Click "Save changes and reset data". Keep in mind, this will delete all data for the connection and start a new sync from scratch.
Everything is now configured to pull your PlanetScale data into Airbyte and sync it to the selected destination on the schedule you chose. To run the connection, click "Connections" > "Launch".
Handling schema changes
Airbyte will not automatically detect when you make schema changes to your PlanetScale database. If you drop a column, your sync should throw an error as it looks for a column that doesn't exist. However, if you add a column, the sync will continue without any errors. Airbyte will be unaware of the new column altogether. This is known as schema drift.
Whenever you perform a schema change, you need to notify Airbyte of it:
PlanetScale Connect is available on all of our free and paid plans during the beta period.
Every Airbyte connection sync will count toward your plan's
rows read. When setting up your connection, make sure you're aware of the impact on
rows read, and choose a synchronization schedule that you're comfortable with.
At any point, you can disable any incremental or full syncs by going to the 'Connection' settings page and clicking 'Delete this connection'. This will not touch any of the source or destination data, but will prevent Airbyte from doing any further operations.