[ADAP-802] [Bug] Unable to read Iceberg tables when using session connection #490
Labels
feature:iceberg
Issues related to Iceberg support
pkg:dbt-spark
Issue affects dbt-spark
Stale
Mark an issue or PR as stale, to be closed
triage:product
In Product's queue
type:bug
Something isn't working as documented
Is this a new bug in dbt-spark?
Current Behavior
A dbt-spark project using the session connection method is unable to read Iceberg tables from Glue catalog due to a
pyspark.sql.utils.AnalysisException
withdesc = SHOW TABLE EXTENDED is not supported for v2 tables
.I did some digging and I think the issue is related to the exception_handler in
connections.py
In particular, this block:
I've verified that my job is hitting the
len(exc.args) == 0
condition, probably because I'm using the session connection method, but I haven't verified that.I was able to work around this error in my local environment by raising a
DbtRuntimeError
with thedesc
from the orginal exception, instead of just re-raising the original exception itself.Is there any reason this method should ever re-raise the original error instead of a
DbtRuntimeError
?Expected Behavior
The
pyspark.sql.utils.AnalysisException
should have been wrapped in aDbtRuntimeError
, and thus handled by the existing logic that checks for this specific error message to deal with Iceberg table metadata properly.Steps To Reproduce
pyspark.sql.utils.AnalysisException
Relevant log output
Environment
Additional Context
No response
The text was updated successfully, but these errors were encountered: