https://dagster.io/ logo
#integration-dbt
Title
# integration-dbt
r

Rasmus Bonnevie

04/13/2023, 1:49 PM
Recently added a second source schema to my
schema.yml
(so I have two sets of tables with identical names, in two different schemas) and now I'm getting errors of this type:
Copy code
KeyError: 'schema1_schema2_tablename'
  File "/home/rasmus/.cache/pypoetry/virtualenvs/annotator-WMT6nzGq-py3.8/lib/python3.8/site-packages/dagster/_grpc/impl.py", line 130, in core_execute_run
    yield from execute_run_iterator(
  File "/home/rasmus/.cache/pypoetry/virtualenvs/annotator-WMT6nzGq-py3.8/lib/python3.8/site-packages/dagster/_core/execution/api.py", line 1096, in __iter__
    yield from self.execution_context_manager.prepare_context()
  File "/home/rasmus/.cache/pypoetry/virtualenvs/annotator-WMT6nzGq-py3.8/lib/python3.8/site-packages/dagster/_utils/__init__.py", line 536, in generate_setup_events
    obj = next(self.generator)
  File "/home/rasmus/.cache/pypoetry/virtualenvs/annotator-WMT6nzGq-py3.8/lib/python3.8/site-packages/dagster/_core/execution/context_creation_pipeline.py", line 324, in orchestration_context_event_generator
    context_creation_data = create_context_creation_data(
  File "/home/rasmus/.cache/pypoetry/virtualenvs/annotator-WMT6nzGq-py3.8/lib/python3.8/site-packages/dagster/_core/execution/context_creation_pipeline.py", line 142, in create_context_creation_data
    resource_keys_to_init=get_required_resource_keys_to_init(
  File "/home/rasmus/.cache/pypoetry/virtualenvs/annotator-WMT6nzGq-py3.8/lib/python3.8/site-packages/dagster/_core/execution/resources_init.py", line 381, in get_required_resource_keys_to_init
    get_required_resource_keys_for_step(pipeline_def, step, execution_plan)
  File "/home/rasmus/.cache/pypoetry/virtualenvs/annotator-WMT6nzGq-py3.8/lib/python3.8/site-packages/dagster/_core/execution/resources_init.py", line 415, in get_required_resource_keys_for_step
    input_def = solid_def.input_def_named(step_input.name)
  File "/home/rasmus/.cache/pypoetry/virtualenvs/annotator-WMT6nzGq-py3.8/lib/python3.8/site-packages/dagster/_core/definitions/node_definition.py", line 144, in input_def_named
    return self._input_dict[name]
something in the node naming scheme appears to blend the schemas inadvertently?
dagster bot responded by community 1
v

Vinnie

04/13/2023, 1:52 PM
Not intimately familiar with what’s going on in the background here, but my guess is you’d now need to pass something to the
node_info_to_asset_key
parameter to make sure dagster can tell them apart
❤️ 1
r

Rasmus Bonnevie

04/14/2023, 7:44 AM
I don't know how it was generating it as default, but I was able to disambiguate the identically-named sources by using
node_info['source_name']
2 Views