Hi, I am working on a self-hosted dagster, deploye...
# integration-dbt
Hi, I am working on a self-hosted dagster, deployed with docker. I have been trying to materialize a set of dbt models using the following:
Copy code
def modelling_dbt_asset(context: OpExecutionContext, dbt_resource: DbtCliResource):
    yield from dbt_resource.cli(["run"], context=context).stream()

modelling_selection = build_dbt_asset_selection([modelling_dbt_asset], dbt_select="tag:modelling")

modelling_dbt_schedule = ScheduleDefinition(
    job=define_asset_job("modelling_selection", selection=modelling_selection),
I have also tried using
to build the schedule. However I am getting the following error when building the repository using the
Copy code
DLAKE_REPO_GRPC: dagster._core.errors.DagsterInvalidDefinitionError: Bad return value from repository construction function: all elements of list must be of type JobDefinition, GraphDefinition, ScheduleDefinition, SensorDefinition, AssetsDefinition, or SourceAsset.Got value of type <class 'dagster_dbt.dbt_manifest_asset_selection.DbtManifestAssetSelection'> at index 7.
Does the
not work with the self-hosted dagster?
Could you share the code for your
decorated function?
works with Dagster open source. My hunch is that you’re passing in
intstead of
to your
Yeah I am passing in both to the
- so that is where the error is coming from - when I only pass
, the job is registered but has no assets loaded. So I was trying to pass in the AssetDefinitions as well.
@rex any thoughts?
Is there sample project setup for self hosted? Perhaps our definitions are not being passed correctly as I see the dbt resource is not registering either. This hooli example seems to be for Dagster cloud deployments.