gouline / dbt-metabase

dbt + Metabase integration
https://pypi.org/project/dbt-metabase/
MIT License
448 stars 64 forks source link

Fix for new pagination envelope in Metabase 0.40.0 #32

Closed gouline closed 3 years ago

gouline commented 3 years ago

Since Metabase 0.40.0, API responses are encapsulated in:

{
    "data": [ "OLD RESPONSE HERE" ],
    "limit": 50,
    "offset": 0,
    "total": 2
}

This change checks if "data" key is present in the root and uses that instead. I will revisit this later, if I need to cater for pagination issues in requests.

gouline commented 3 years ago

This change has been backported and released as 0.7.1 to unblock anyone who upgraded their Metabase, but not ready to migrate to 0.8.0 to be released soon with some breaking changes.

fernandobrito commented 2 years ago

Thanks for the good PR description. One of our in-house automation (deactivate inactive Metabase users) started failing after upgrading to 0.40 and your description here made it very easy to understand exactly what has changed 😄 .