Error: Failed To Create a Foreign Key
Issue
The Fivetran Platform Connector displays the following warning:
Failed to create foreign key. We couldn't create foreign keys for the following columns because the referenced schema or table doesn't exist or is not authorized.
Environment
Fivetran Platform Connector
Resolution
To resolve this issue, trigger a historical re-sync of your connection. For instructions, see How to Trigger Historical Re-Syncs for Fivetran Connections. This lets Fivetran re-process the metadata and restore the missing foreign key constraint automatically.
Cause
This issue occurs when we initially fails to create a foreign key constraint because the referenced schema or table doesn't exist. When an attempt fails, we don't retry that specific constraint during subsequent syncs, even when the referenced table becomes available.