Josh Lloyd
09/05/2023, 8:30 PM@multi_asset(
outs={
name: AssetOut(key=asset_key)
for name, asset_key in get_asset_keys_by_output_name_for_source(
[edp_dbt_assets], "gainsightpx"
).items()
}
)
def gainsightpx(context):
meltano_run_op(f"--force tap-gainsightpx target-snowflake")()
output_names = list(context.selected_output_names)
for output_name in output_names:
yield Output(value=..., output_name=output_name)
Where do I go from here?jamie
09/05/2023, 9:13 PMJosh Lloyd
09/05/2023, 9:24 PMJosh Lloyd
09/05/2023, 9:27 PM@graph_multi_asset
as opposed to @multi_asset
but it still won’t run. It will at least get me to the UI, but when I try to materialize them I get:
dagster._core.errors.DagsterInvalidSubsetError: When building job, the AssetsDefinition 'gainsightpx' contains asset keys [AssetKey(['raw_gainsightpx', 'accounts']), AssetKey(['raw_gainsightpx', 'custom_events']), ... ], but attempted to select only [AssetKey(['raw_gainsightpx', 'users'])]. This AssetsDefinition does not support subsetting. Please select all asset keys produced by this asset.
Josh Lloyd
09/05/2023, 9:28 PM@graph_multi_asset(
resource_defs={"meltano": meltano_resource},
outs={
name: AssetOut(key=asset_key)
for name, asset_key in get_asset_keys_by_output_name_for_source(
[edp_dbt_assets], "raw_gainsightpx"
).items()
}
)
def gainsightpx():
result = meltano_run_op(f"--force tap-gainsightpx target-snowflake")()
asset_keys = get_asset_keys_by_output_name_for_source([edp_dbt_assets], "raw_gainsightpx")
outs = {}
for asset_key in asset_keys:
outs[asset_key] = result
return outs
Josh Lloyd
09/05/2023, 9:29 PMclaire
09/08/2023, 7:07 PM