Skip to content

Commit b706669

Browse files
committed
fix: modify calls to translator to pass fqn instead
This fixes the error where materialisations return wrong asset keys, and hence can't be marked as completed on Dagster.
1 parent 0e60e04 commit b706669

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

dagster_sqlmesh/resource.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,8 @@ def notify_success(
146146
# We allow selecting models. That value is mapped to models_map.
147147
# If the model is not in models_map, we can skip any notification
148148
if model:
149-
output_key = self.translator.get_asset_key_str(model.name)
149+
# Passing model.fqn to translator
150+
output_key = self.translator.get_asset_key_str(model.fqn)
150151
asset_key = self._context.asset_key_for_output(output_key)
151152
yield MaterializeResult(
152153
asset_key=asset_key,
@@ -302,7 +303,7 @@ def run(
302303
models_map = {}
303304
for key, model in models.items():
304305
if (
305-
translator.get_sqlmesh_model_name_from_key_str(model.name)
306+
translator.get_asset_key_str(model.fqn)
306307
in context.selected_output_names
307308
):
308309
models_map[key] = model

0 commit comments

Comments
 (0)