Can somebody point me to the point in the code whe...
# integration-dbt
Can somebody point me to the point in the code where
matches sources to assets, please? I'm having issues with
references in my
models. I merely want them for lineage tracking. A model (or a model with a
to a model that uses the
upstream) uses
{{ source("example_db", "example_table") }}
, which exists in
. No
field. Assume the profile is called
. Executing a job sometimes yields
Failed to start
due to
Copy code
KeyError: 'source_christian_example_db_example_table'
  File "/usr/local/lib/python3.10/site-packages/dagster/_grpc/", line 137, in core_execute_run
    yield from execute_run_iterator(
  File "/usr/local/lib/python3.10/site-packages/dagster/_core/execution/", line 863, in __iter__
    yield from self.execution_context_manager.prepare_context()
  File "/usr/local/lib/python3.10/site-packages/dagster/_utils/", line 491, in generate_setup_events
    obj = next(self.generator)
  File "/usr/local/lib/python3.10/site-packages/dagster/_core/execution/", line 291, in orchestration_context_event_generator
    context_creation_data = create_context_creation_data(
  File "/usr/local/lib/python3.10/site-packages/dagster/_core/execution/", line 116, in create_context_creation_data
    resource_keys_to_init=get_required_resource_keys_to_init(execution_plan, job_def),
  File "/usr/local/lib/python3.10/site-packages/dagster/_core/execution/", line 372, in get_required_resource_keys_to_init
    get_required_resource_keys_for_step(job_def, step, execution_plan)
  File "/usr/local/lib/python3.10/site-packages/dagster/_core/execution/", line 405, in get_required_resource_keys_for_step
    input_def = node_def.input_def_named(
  File "/usr/local/lib/python3.10/site-packages/dagster/_core/definitions/", line 143, in input_def_named
    return self._input_dict[name]
It's also flaky - sometimes it seems to work, sometimes it doesn't. It also doesn't affect all jobs, which makes no sense, since I code-gen my
, i.e. if a table exists, it's in there. The format of the missing asset key is
In my case, the source asset does exists, albeit simply called
example_db / example_table
. The lineage in the UI works, too. Specifying
Copy code
- name: example_table
        - source_christian_example_db_example_table
Seems to do the trick, but I guess I'll find out on Tuesday after it had a chance to run. More importantly, I don't understand why (and why it sometimes works and sometimes doesn't). So any pointers would be appreciated. fwiw, this is running on K8s + redis. I can't reproduce this locally, Running 1.4.11 + 0.20.11.
I take back the statement that this fixes anything. I'm getting the same error after deploying a new code version, alongside
DagsterInvariantViolationError ..._job has no op named run_dbt_
Yes, but even when using that to explicitly rename assets, I'm still being hit with a "KeyError", despite the asset existing with exactly that name now.
Mind posting the error you’re hitting, as a new top-level thread in this channel? I’m out for the next couple weeks, and that will allow someone else to get notified when the workweek starts