Snowflake data connection error for mismatch with view definition

Getting an error when connecting to snowflake. this was working before and I believe we didn’t change anything so wondering if it is some change made on the source system that we need to fix or if it’s something I can fix.

java.lang.RuntimeException: java.lang.Throwable: java.util.concurrent.ExecutionException: net.snowflake.client.jdbc.SnowflakeSQLException: SQL compilation error: View columns mismatch with view definition for view 'TABLENAME' at line 1, position 14, please re-create the view

Are you able to preview the View in Snowflake?
Error message sounds like one of the underlying tables have changed and the view is not valid anymore.

nope not able to see preview either

What’s the error message within snowflake? (When you do select * from view_that_fails limit 1)

Still getting the same error
The explorer command failed to run:
java.lang.Throwable:RemoteException: INVALID_ARGUMENT (MagritteExplorer:SqlError) with instance ID 95998048-4a36-49fa-8836-c6c29907c015: {reason=SQL compilation error: View columns mismatch with view definition for view ‘TABLE NAME’ at line 1, position 14, please re-create the view, originalErrorInstanceId=78df08ed-6a42-48cd-bff7-4cd3486c127d, stacktrace=com.palantir.magritte.explorer.jdbc.MagritteExplorerErrors.sqlError(MagritteExplorerErrors.java:25)

Repeating my question: are you able to query this view from within snowflake (not foundry!)?

Hi @rsaito

Double-tapping @nicornk’s suggestion: can you confirm that from within Snowflake, when you navigate to the View, you can preview it?

Most likely hypothesis here is that the tables used behind the View have changed, and as a result the query that is creating the View is failing - similar to the behavior described here https://stackoverflow.com/questions/68038013/snowflake-sql-compilation-error-view-definition-declared-but-view-query-produce

If that’s confirmed, you need to fix the View query on Snowflake side before being able to re-ingest it from Foundry

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.