https://dagster.io/ logo
#ask-community
Title
# ask-community
q

Qwame

08/22/2022, 4:06 PM
I just upgraded to
v1.0.4
and I am having issues with exposures in my dbt project. I used the
load_assets_from_dbt_manifest
in my project and now I get the error:
Copy code
KeyError: 'exposure.my_project.tableau_dash_model_a'

File "/Users/dagster/dagster-env/lib/python3.9/site-packages/dagster/_grpc/server.py", line 227, in __init__
    self._loaded_repositories = LoadedRepositories(
  File "/Users/dagster/dagster-env/lib/python3.9/site-packages/dagster/_grpc/server.py", line 101, in __init__
    loadable_targets = get_loadable_targets(
  File "/Users/dagster/dagster-env/lib/python3.9/site-packages/dagster/_grpc/utils.py", line 33, in get_loadable_targets
    else loadable_targets_from_python_file(python_file, working_directory)
  File "/Users/dagster/dagster-env/lib/python3.9/site-packages/dagster/_core/workspace/autodiscovery.py", line 26, in loadable_targets_from_python_file
    loaded_module = load_python_file(python_file, working_directory)
  File "/Users/dagster/dagster-env/lib/python3.9/site-packages/dagster/_core/code_pointer.py", line 86, in load_python_file
    return import_module_from_path(module_name, python_file)
  File "/Users/dagster/dagster-env/lib/python3.9/site-packages/dagster/_seven/__init__.py", line 51, in import_module_from_path
    spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 850, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/Users/dagster/dagster-test/repos.py", line 1, in <module>
    from repositories.bia_repo import rdmart_repository
  File "/Users/dagster/dagster-test/repositories/bia_repo/__init__.py", line 5, in <module>
    from repositories.bia_repo.assets import dbt_project_assets, dbt_resource_defs
  File "/Users/dagster/dagster-test/repositories/bia_repo/assets.py", line 7, in <module>
    dbt_project_assets = load_assets_from_dbt_manifest(
  File "/Users/dagster/dagster-env/lib/python3.9/site-packages/dagster_dbt/asset_defs.py", line 545, in load_assets_from_dbt_manifest
    selected_unique_ids = _select_unique_ids_from_manifest_json(manifest_json, select, exclude)
  File "/Users/dagster/dagster-env/lib/python3.9/site-packages/dagster_dbt/asset_defs.py", line 109, in _select_unique_ids_from_manifest_json
    selector = graph_selector.NodeSelector(graph, manifest)
  File "/Users/dagster/dagster-env/lib/python3.9/site-packages/dbt/graph/selector.py", line 58, in __init__
    graph_members = {
  File "/Users/dagster/dagster-env/lib/python3.9/site-packages/dbt/graph/selector.py", line 59, in <setcomp>
    unique_id for unique_id in self.full_graph.nodes() if self._is_graph_member(unique_id)
  File "/Users/dagster/dagster-env/lib/python3.9/site-packages/dbt/graph/selector.py", line 169, in _is_graph_member
    node = self.manifest.nodes[unique_id]
I didn't have this issue on
v1.0.3
. Any reason why I am getting this and how do I fix it? All I did was upgrade, no change in code.
🤖 1
r

Rasul Kireev

08/23/2022, 7:38 PM
I have the same issue. Still trying to fix it.
q

Qwame

08/23/2022, 7:48 PM
I switched from
load_assets_from_manifest
to
load_assets_from_dbt_project
and this error disappeared. I guess there's something wrong with the loading from manifest.json
r

Rasul Kireev

08/23/2022, 7:59 PM
That’s what I’m trying now. Getting a different, unrelated error though 🙂
q

Qwame

08/23/2022, 8:25 PM
Wanna start a new thread with the error you are getting? Maybe you can get some help. 😄
This is what worked for me. Maybe it will help
Copy code
dbt_assets = with_resources(
    load_assets_from_dbt_project(
        project_dir='/dbt-project-a',
        profiles_dir='/dbt-project-a-profiles-dir'
    ),
   
    {'dbt': dbt_cli_resource.configured( .... ) }
)
3 Views