-
Notifications
You must be signed in to change notification settings - Fork 242
Open
Description
The dbt integration seems to be broken (all current latest versions from pypi.cloud.soda.io, not using the core versions). I run it from Python like this:
- Create a scan object
- Make sure this scan object has a configuration for Soda Cloud and for the data source we are using
- Set the scan definition name and the data source name on the scan object
- Create a DbtCloud object and pass it the scan object
- Run .ingest on the dbt ingestor
File "/tmp/ipykernel_40/3283421021.py", line 7, in <module>
exit_value = ingestor.ingest()
^^^^^^^^^^^^^^^^^
File "/home/trusted-service-user/jupyter-env/python3.11/lib/python3.11/site-packages/soda/cloud/dbt.py", line 135, in ingest
self.flush_test_results(
File "/home/trusted-service-user/jupyter-env/python3.11/lib/python3.11/site-packages/soda/cloud/dbt.py", line 143, in flush_test_results
scan_results = self.build_scan_results(checks)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/trusted-service-user/jupyter-env/python3.11/lib/python3.11/site-packages/soda/cloud/dbt.py", line 151, in build_scan_results
check_dicts = [check.get_cloud_dict() for check in checks]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/trusted-service-user/jupyter-env/python3.11/lib/python3.11/site-packages/soda/cloud/dbt.py", line 151, in <listcomp>
check_dicts = [check.get_cloud_dict() for check in checks]
^^^^^^^^^^^^^^^^^^^^^^
File "/home/trusted-service-user/jupyter-env/python3.11/lib/python3.11/site-packages/soda/execution/check/dbt_check.py", line 36, in get_cloud_dict
"name": self.name,
^^^^^^^^^
File "/home/trusted-service-user/jupyter-env/python3.11/lib/python3.11/site-packages/soda/execution/check/check.py", line 235, in name
jinja_resolve = self.data_source_scan.scan.jinja_resolve
^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'scan'
So the error is because the check objects created by the ingestor don't have a data source set and the check.name uses the data source to build its name.
Metadata
Metadata
Assignees
Labels
No labels