Closed 2ult4n closed 4 months ago
@2ult4n Thanks for opening, appreciate the thorough write-up.
My guess is that dbt is failing when it tries to run a metadata query (show table extended
), and as you say, there is no default namespace in which to run it. You can look in the debug-level logs to confirm exactly what query dbt is running when it encounters the error (dbt run --debug
or logs/dbt.log
).
This doesn't feel like a priority for us to fix, but it would be a reasonable think to document here:
I'd welcome you to open a PR against the documentation repo, and to link back to this issue for context.
Is this a new bug in dbt-spark?
Current Behavior
I'm running a cluster with no default namespace however I'm trying to connect to different namespace which is nyc whenever I try to run or debug I encounter the following error:
But if I created a namespace default in spark even though I didn't specify connecting to it in the profile:
Expected Behavior
Successfully be able to debug and run regardless of the state of default namespace.
Steps To Reproduce
Using the following docker setup for spark: https://github.com/tabular-io/docker-spark-iceberg
the following profile:
project:
Relevant log output
No response
Environment
Additional Context
from what I gathered that there is an initial check fired pre run or debug which execute the following query in order to check the connection:
select 1 as id
I think it gets executed in without specifying a namespace so it will try to execute it in the default namespace which doesn't exist so the check will prevent both run or debug to be successful regardless if the configs are correct.
IMO i think it should specify the schema in the config to prevent this kind of errors.
Thanks