Alex Orlovskyi
08/20/2023, 1:56 PM@dbt_assets(
manifest=Path(settings.SOME_DBT_PROJECT_PATH, "target", "manifest.json"),
partitions_def=some_partitions_def,
select="some.model",
dagster_dbt_translator=SomeDagsterDbtTranslator(),
)
def some_dbt_assets(
context: OpExecutionContext,
dbt: DbtCliResource,
config: SomeDBTAssetConfig,
):
dbt_invocation = dbt.cli(["run", "--vars", json.dumps(config.dict())], context=context)
yield from dbt_invocation.stream()
run_results_json = dbt_invocation.get_artifact("run_results.json")
<http://context.log.info|context.log.info>(f"dbt run results: {run_results_json}")
With this code when I have some problems with dbt, like SQL error I see following state at the Dagster UI (attached screenshot).
Question: will dbt errors (like sql error in model) be parsed and displayed at error context at Dagster UI as it was previously (in my case - when dagster was v1.3.13, dbt 1.4.5)?
If no, then -> how can i retrieve error details without need to access file run_results.json
manually?
(Tried to do so programmatically (last 2 rows in my code snippet), but Dagster is calling _raise_on_error
inside .get_artifact
so execution don't even come to that point).Qwame
08/20/2023, 4:40 PMQwame
08/20/2023, 4:43 PMAlex Orlovskyi
08/20/2023, 5:11 PMrex
08/21/2023, 3:12 PMdbt.log
file produced by your computation, so that you can inspect that quickly when doing local development.
In production though, we’ll still recommend that you view your error logs in our Dagster compute logs, as Qwame mentioned.Ankit Singhal
09/21/2023, 4:11 PM