Search documentation...

ChangelogBook a demoSign up


Power internal tools, in-app experiences, and more

View PlanetScale's documentation and status page.

Supported syncing

Sync TypeDescriptionSupported Sync Modes
TableSync data from any source to a PlanetScale tableUpsert

For more information about sync modes, refer to the sync modes docs.

Connect to PlanetScale

Go to the Destinations overview page and click the Add destination button. Select PlanetScale and click Continue.

Enter the following required fields into Hightouch:

  • Host: The hostname or IP address of your PlanetScale server.
  • Port: The port number of your PlanetScale server. The default is 3306, but yours may be different.
  • Database: This specifies the database to use when Hightouch executes queries in Planetbase. This is different than the host, but your host address might contain your database name.
  • User: This can be your personal PlanetScale login or a dedicated user for Hightouch.
  • Password: The password for the user specified above.

Sync configuration

Once you've set up your PlanetScale destination and have a model to pull data from, you can set up your sync configuration to begin syncing data. Go to the Syncs overview page and click the Add sync button to begin. Then, select the relevant model and the PlanetScale destination you want to sync to.

Select table

Select the existing table in PlanetScale you want to sync to.

Record matching

You can match rows from your model to rows in PlanetScale on any column as long as it is a primary key or unique key.

You can see columns that fit this criteria as available options in records matching section.

Sync configuration in the Hightouch UI

If there are no fields in the dropdown, you must add a unique type column to your PlanetScale table. Then, click the refresh icon to access the newly created column.

Field mapping

Select which model columns you want to sync to your PlanetScale table columns. Hightouch automatically pulls the columns from your table to make them available for you to map.

When syncing to binary destination fields, Hightouch assumes the model column values to be base64 strings. If they aren't, you can use template mapping to cast them if needed.

Base 64 template mapping

Batch size

You can tune the number of rows Hightouch upserts per query based on your needs and database threshold. The default is 1000 rows per batch.

If you want to increase the sync's speed, you can increase the batch size. Keep in mind that PlanetScale fails the entire batch of rows if it detects any erroneous row. If you suspect that you will have many bad rows, don't use a high batch size. To avoid locks, ensure you account for your database's capacity when increasing the batch size.

Delete behavior

When rows no longer shows up from your model's query results, you can configure the sync to Do nothing or Delete those rows from the PlanetScale.

Do nothingKeep the synced rows in the table in PlanetScale
DeleteDelete the synced rows from the table in PlanetScale

Tips and troubleshooting

Common errors

To date, our customers haven't experienced any errors while using this destination. If you run into any issues, please don't hesitate to . We're here to help.

Live debugger

Hightouch provides complete visibility into the API calls made during each of your sync runs. We recommend reading our article on debugging tips and tricks to learn more.

Sync alerts

Hightouch can alert you of sync issues via Slack, PagerDuty, SMS, or email. For details, please visit our article on alerting.

Ready to get started?

Jump right in or a book a demo. Your first destination is always free.

Book a demoSign upBook a demo

Need help?

Our team is relentlessly focused on your success. Don't hesitate to reach out!

Feature requests?

We'd love to hear your suggestions for integrations and other features.

Last updated: May 15, 2023

On this page

Supported syncingConnect to PlanetScaleSync configurationSelect tableRecord matchingField mappingBatch sizeDelete behaviorTips and troubleshootingCommon errorsLive debuggerSync alerts

Was this page helpful?