How do I edit/save all my Heroku Connect mappings at once?

Issue

Some operations, including Salesforce schema changes and API version upgrades, require Heroku Connect to get an updated copy of your Salesforce schema and apply appropriate changes to your Postgres database tables. In these cases, we typically ask customers to edit the mapping and save it again, without making any changes. But for customers with lots of mappings, perhaps across multiple connections, this can be very time-consuming.

Resolution

An easy way to edit every mapping at once is to import a configuration file into your connection. You can export your existing configuration from the Manage Connection tab on your dashboard, then import that file back into your connection, without making any changes to it. This won't make any changes to your connection or reload any tables, but it will trigger a save on every mapping, which will kick off the necessary tasks to recover from the original changes that were made.

For customers with multiple connections, this process can also be performed using our CLI plugin.

$ heroku connect:export
fetching configuration... done
writing configuration to file... app-haiku-1234-herokuconnect-haiku-12345.json
$ heroku connect:import app-haiku-1234-herokuconnect-haiku-12345.json
uploading app-haiku-1234-herokuconnect-haiku-12345.json... done

This can then be easily scripted to apply to multiple environments using the --app and --resource arguments as well.

Ask on Stack Overflow

Engage with a community of passionate experts to get the answers you need

Ask on Stack Overflow

Heroku Support

Create a support ticket and our support experts will get back to you

Contact Heroku Support