Skip to content

Commit

Permalink
Merge branch 'master' into test-fixture-recorder
Browse files Browse the repository at this point in the history
  • Loading branch information
gouline authored Jun 20, 2024
2 parents 242d389 + adf4dca commit 8dff6f2
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions dbtmetabase/_exposures.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def extract_exposures(
models = self.manifest.read_models()

ctx = self.__Context(
model_refs={m.name: m.ref for m in models if m.ref},
model_refs={m.name.lower(): m.ref for m in models if m.ref},
table_names={t["id"]: t["name"] for t in self.metabase.get_tables()},
)

Expand Down Expand Up @@ -165,6 +165,8 @@ def extract_exposures(
count = counts.get(name, 0)
counts[name] = count + 1

_logger.error(ctx.model_refs)

exposures.append(
{
"id": item["id"],
Expand All @@ -182,9 +184,9 @@ def extract_exposures(
creator_email=creator_email or "",
native_query=native_query,
depends_on={
ctx.model_refs[depend]
ctx.model_refs[depend.lower()]
for depend in depends
if depend in ctx.model_refs
if depend.lower() in ctx.model_refs
},
),
}
Expand Down

0 comments on commit 8dff6f2

Please sign in to comment.