Why did Heroku Connect truncate my column name?


After configuring a mapping with a relationship field that has a long combined name, the corresponding column name in Postgres doesn't contain the full name that was selected for the mapping. Instead, the column name is only 63 characters long. In addition, Heroku Connect may report that the database schema has changed, even though no one manually edited the schema, and the only noted difference is this truncated column name.

Postgres has a limit of 63 characters for identifiers, such as column names. It will allow tools like Heroku Connect to specify longer name when adding or renaming columns, but will only use the first 63 characters when actually naming the field. Salesforce has a limit of 40 characters for object and field names, so most fields won't exhibit this issue. but relationship fields combine the object name and field name into a single name that can be up to 82 characters long.

When mapping such a field, Heroku Connect will create the column in Postgres and write data to it, and will operate normally for a read-only mapping. But for a read-write mapping, this mismatch in field names will prevent data from that column being written to Salesforce.


Currently, there are only two available workarounds for this situation:

  • In Salesforce, decrease the length of the name of the field or the object it's attached to, so that the combined total is 61 or less. Salesforce automatically adds two underscores (__) between the two names, which would bring the total to 63.
  • Don't include that field in the mapping

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