diff --git a/dbtmetabase/_exposures.py b/dbtmetabase/_exposures.py index c842e81..7cf4cb7 100644 --- a/dbtmetabase/_exposures.py +++ b/dbtmetabase/_exposures.py @@ -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()}, ) @@ -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"], @@ -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 }, ), }