gouline / dbt-metabase

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

Multiple schemas in project #3

Closed dubravcik closed 3 years ago

dubravcik commented 4 years ago

We are using multiple schemas specified in dbt_project.yml. It would be great if dbt-metabase follows the schema settings and does not send everything to the schema from the command line.

models:
  my_project:
    marketing:
      schema: marketing
    product:
      schema: product
    events:
      schema: events

thanks @gouline :)

gouline commented 4 years ago

No current plans to implement this as I have no use case for it, but feel free to implement it and contribute. The codebase is pretty small and easy to follow :)

gouline commented 3 years ago

@z3z1ma I think your recent PRs implement this, right? Thinking of closing this issue.

z3z1ma commented 3 years ago

Yes that's right @gouline . We resolved this for both parsers using a hash key.

We allow no schema passed so long as user is using manifest parser since we can reliably resolve schema in all cases to construct the schema.table hash.

Folder parser is multi schema compliant only with multiple invocations (one per schema since we need the arg to construct the hash) and even then I'm sure I could imagine nuances that make manifest parser superior for model propagation.