Does anybody have en example of how to use a asset...
# ask-community
t
Does anybody have en example of how to use a asset definition using
dbt_assets
in a job? I think I am missing how to pass the dbt resource to it. I get this error.
Copy code
dagster._core.errors.DagsterInvalidDefinitionError: resource with key 'dbt' required by op 'sca_custom_assets' was not provided. Please provide a <class 'dagster._core.definitions.resource_definition.ResourceDefinition'> to key 'dbt', or change the required key to one of the following keys which points to an <class 'dagster._core.definitions.resource_definition.ResourceDefinition'>: ['io_manager']
🤖 1
r
your
Definitions
object's
resources
argument needs to have
DbtCliResource
supplied to it.
Copy code
defs = Definitions(
    assets=[sca_custom_assets],
    resources={
        "dbt": DbtCliResource(project_dir=os.fspath(dbt_project_dir)),
    },
)
I suggest that you follow https://docs.dagster.io/integrations/dbt/using-dbt-with-dagster if you haven't already.
t
Thank you, I coudln't figure out that was where it needed to be!