You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the _exposures.py at a certain point you have the following code:
table_names={
t["id"]: ".".join(
[
dbname(t["db"]["details"]),
t["schema"] or DEFAULT_SCHEMA,
t["name"],
]
).lower()
for t in self.metabase.get_tables()
},
It seems that recently the Metabase API, when you run self.metabase.get_tables(), returns also some internal tables. For example, this table here
So, when you do t["db"]["details"], it breaks because it cannot find the details key.
IDK what a possible solution could be, but probably just ignore these Metabase internal tables. It could be done by filtering out the tables when the database name is Internal Metabase Database. IDK how reliable this solution is tho, or how likely is that Metabase will change the API behavior in the next future.
Let me know if I can help with this, thanks for the support!
The text was updated successfully, but these errors were encountered:
I tracked it down to a Metabase pull request about auditing, which is an enterprise feature, so I can't reproduce it in the open source sandbox. Not sure how to best filter it, I just added a check for "details" 🤷♂
In the
_exposures.py
at a certain point you have the following code:It seems that recently the Metabase API, when you run
self.metabase.get_tables()
, returns also some internal tables. For example, this table hereSo, when you do
t["db"]["details"]
, it breaks because it cannot find thedetails
key.IDK what a possible solution could be, but probably just ignore these Metabase internal tables. It could be done by filtering out the tables when the database name is
Internal Metabase Database
. IDK how reliable this solution is tho, or how likely is that Metabase will change the API behavior in the next future.Let me know if I can help with this, thanks for the support!
The text was updated successfully, but these errors were encountered: