gouline / dbt-metabase

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

feat: Support explicit foreign key relationships #139

Closed gouline closed 1 year ago

gouline commented 1 year ago

Tentatively support explicit foreign keys, without relationship tests:

- name: user_id
  meta:
    metabase.foreign_key_to: ref('users')
    metabase.foreign_key_field: id

Works with folder parser only (for now, will consider adding to manifest parser in future).

willbryant commented 1 year ago

I thought this is what the documented metabase.fk_target_table/metabase.fk_target_field thing already did?

gouline commented 1 year ago

I thought this is what the documented metabase.fk_target_table/metabase.fk_target_field thing already did?

My bad, should have checked existing implementation. I'll rename them back and add my changes to that.