Error: Syntax Error: Expected “(“ or “,” or Keyword SELECT but Got Keyword WITH
Issue
A transformation is successful when you run it locally. However, when you run it in Fivetran, the following error appears in the transformation run logs:
Syntax error: Expected "(" or "," or keyword SELECT but got keyword WITH.
Environment
Transformations for dbt Core
Resolution
To resolve this issue, grant ownership permission of the table in the destination to the authenticating user.
Cause
This issue occurs when the authenticating user does not have ownership permission on the table in the destination.