这是由于DBT版本升级后,dbt.exceptions模块已经没有RuntimeException了,因此需要使用新的Exception名称。可以在代码中直接使用具体的Exception类来代替RuntimeException,例如使用dbt.exceptions.CompilationException。 代码示例:
from dbt.exceptions import CompilationException
try:
# your code
except CompilationException as e:
# handle exception