Alert: SQL Compilation Error: Invalid Identifier
Issue
The following alert appears in Fivetran:
Caused by: net.snowflake.client.jdbc.SnowflakeSQLException: SQL compilation error: error line <line> at position <position> invalid identifier '"<table_name>"."<column_name>"'
Environment
Destination: Snowflake
Resolution
To resolve this issue:
- Identify the affected table and column in the error message.
- In Fivetran, re-sync the affected table.
- If the alert persists after the table-level re-sync completes, trigger a connection-level re-sync.
For instructions, see How to Trigger Re-Syncs for Fivetran Connections and Tables.
Cause
This issue occurs when Snowflake cannot resolve a column referenced during a sync. This may happen if the column is missing, renamed, or changed in the source. A re-sync refreshes the table schema and recreates or updates the column definition in the destination.