You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems like the issue might be related to an unpinned dependency or a change in the data structure. The method update_reason expects a scanned result containing a dictionary called diagnostics, which should have a key fail.
The use of [] index syntax will raise an exception if the key fail is missing. It would be safer to use the .get() method, which allows for a default value when the key is absent (e.g., diagnostics.get('fail')). However, the underlying issue seems to be that the fail key is no longer present, which might be due to an update in the structure or behavior of the data.
ERROR:root:Exception occurred
Traceback (most recent call last):
File "/home/rderienzo/.local/lib/python3.11/site-packages/datacontract/data_contract.py", line 202, in test
check_soda_execute(run, data_contract, server, self._spark, tmp_dir)
File "/home/rderienzo/.local/lib/python3.11/site-packages/datacontract/engines/soda/check_soda_execute.py", line 133, in check_soda_execute
update_reason(check, c)
File "/home/rderienzo/.local/lib/python3.11/site-packages/datacontract/engines/soda/check_soda_execute.py", line 185, in update_reason
if c["diagnostics"]["fail"] is not None:
~~~~~~~~~~~~~~~~^^^^^^^^
KeyError: 'fail'
ERROR:root:'fail'
The text was updated successfully, but these errors were encountered:
It seems like the issue might be related to an unpinned dependency or a change in the data structure. The method
update_reason
expects a scanned result containing a dictionary calleddiagnostics
, which should have a keyfail
.The use of
[]
index syntax will raise an exception if the keyfail
is missing. It would be safer to use the.get()
method, which allows for a default value when the key is absent (e.g.,diagnostics.get('fail')
). However, the underlying issue seems to be that thefail
key is no longer present, which might be due to an update in the structure or behavior of the data.The text was updated successfully, but these errors were encountered: