Hello, we updated our Dagster's version to 1.4.0 a...
# integration-dbt
t
Hello, we updated our Dagster's version to 1.4.0 and are currently refactoring following the changes that have been introduced by version 1.4.0. We are looking to yield AssetMaterialization from a Job Op. I don't understand how this example could work, method
get_asset_key_for_output_name
won't exist on the manifest (it used to with DbtManifest class). Did I miss something ?
r
We removed some internal APIs that made this possible. Here’s a PR that brings it back in a first class manner: https://github.com/dagster-io/dagster/pull/15461 Once this lands, you’ll be able to do something like this:
Copy code
import json
from pathlib import Path

from dagster import Output, op
from dagster_dbt import DbtCliResource

manifest = json.loads(Path("target", "manifest.json").read_text())


@op
def my_dbt_op(dbt: DbtCliResource):
    yield from dbt.cli(["run"], manifest=manifest).stream(yield_asset_materialization=True)
    yield Output(None)
👌 1