Question

Snowflake EXPLAIN query support with Snowflake JDBC Driver

  • Posted April 9, 2022
  • API

Is there a way to run an EXPLAIN snowflake query through the JDBC driver with the Snowflake extension? I am running net.snowflake snowflake-jdbc 3.12.8 and it throws an error saying net.snowflake.client.jdbc.SnowflakeSQLException: SQL compilation error: syntax error line 1 at position 15 unexpected ‘EXPLAIN’… I see there are more up to date versions to 3.12.16 but nothing in the release notes mentions this added capability. The same exact query I am running works successfully in the snowflake UI.

Subscribe
Share

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hello,

Yes, according to the official documentation, the EXPLAIN SQL statement is supported:

https://docs.snowflake.com/en/sql-reference/sql/explain.html

This is most likely caused by a syntax error in your SQL statement.

Can you share the complete SQL query that you are running?

Best,

Bobby