gouline / dbt-metabase

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

feat: Support --metabase_session_id #83

Closed lawrencejones closed 2 years ago

lawrencejones commented 2 years ago

Metabase lacks proper support for authenticating from automation, which means we have to exchange a username and password for a session token before each invocation of this command.

These count as login attempts, which are rate limited. Depending on your needs, you may hit the rate limit and find your schemas can no longer be synced.

Providing a --metabase_session_id allows the user to reuse and existing Metabase session, should they have it, allowing them to avoid the login rate limits (and in some cases, an annoying email!).

lawrencejones commented 2 years ago

Hey team! I haven't written any Python in years so this is unlikely to work, but I'd love early feedback on the proposed change.

I'll make sure this is actually functional once it gets the green light.

gouline commented 2 years ago

Approach looks fine overall, you have some syntax errors as the CI shows. Please run these checks locally to debug and let me know when you're ready for a code review.

lawrencejones commented 2 years ago

Yep, I definitely eye balled this! Now I know you're ok with the approach I'll fix it up on Monday :)

gouline commented 2 years ago

@lawrencejones Still planning to get this merged?

lawrencejones commented 2 years ago

Ah sorry about this, haven't had a chance to get back to our data stuff since I was first working on it.

Appreciate you getting this over the line 🙌