-
Notifications
You must be signed in to change notification settings - Fork 234
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] Cannot run unit tests against Spark/Hudi, receiving "NoneType is not iterable" error #1047
Comments
Thanks for raising this issue @KLarrabee-Arcadia. To help narrow down the issue, could you try out this "hello world" example to see if it works for you?
unit_tests:
- name: test_hello_world
model: hello_world
given: []
expect:
rows:
- {hello: world} Run this command to execute the unit tests and then build the model if they pass: dbt build --select hello_world |
Thanks for responding @dbeatty10! I just added it and see the same error:
|
@dbeatty10 I also set up a different branch in that example repo that has two different Spark backends, one configured for Hudi and one with a default configuration, as well as a Postgre backend. Running
|
Hello, did you manage to fix this @KLarrabee-Arcadia? I had unit tests working perfectly with thrift + docker on my local environment but I just started getting this same error after updating my image to use spark 3.5 I don't know if it's related in any way to this past issue but I was able to make it work after replicating the change specified here on the pyhive code. |
Is this a new bug in dbt-core?
Current Behavior
We are attempting to run DBT unit tests against a local dockerized Spark/Hudi container, and while
dbt run
is perfectly successful, we cannot for the life of us getdbt test
to work properly despite following docs and searching through issues. Anything we do (assuming the test spec is valid - otherwise we appropriately get hints like "need given", etc) just results in'NoneType' object is not iterable
errors:One of my coworkers was successfully running the unit tests against DuckDB, so we assumed the test specs were fine.
Expected Behavior
The test should pass/fail rather than error out.
Steps To Reproduce
I created a very simple repository where (1)
dbt run
is successful and (2)dbt test
results in the error above (see repo README for steps to reproduce success and failure).Relevant log output
After locally adding
import traceback; print(traceback.format_exc())
right before this line I observed the following stack trace:Is there some configuration that I missed for unit tests that is making this fail via PyHive, Thrift, etc?
When I look at the compiled SQL for the unit tests in the
targets/
folder, it does indeed create valid SQL that, when I run manually inbeeline
, returns expected results.Environment
Which database adapter are you using with dbt?
spark
Additional Context
This is specific to unit tests, since data tests run perfectly fine.
The text was updated successfully, but these errors were encountered: