Closed elca-anh closed 3 months ago
Thanks for opening, will run the test suite to see where we stand.
Hi, I am really keen to use the non-expression method for foreign keys. Unfortunately, when I try it, I get an error message like: "No parent table defined for foreign key: " followed by a trace.
I have configured the schema for the model like so:
- name: example__child_table
constraints:
- type: primary_key
name: pk_example__child_table
columns: ["id"]
- type: not_null
columns: ["id", "name", "parent_id"]
- type: foreign_key
name: fk_example__child_table_1
columns: ["parent_id"]
parent: parent_table
parent_columns: ["id"]
columns:
- name: id
- name: name
- name: parent_id
Any tips on how to get this working? I've had a look at the macro code, and it appears the constraint.get("parent") call is not returning anything, hence the error message, but I can't see anything obvious I am doing wrong.
Running with adaptor version 1.8.5
Resolves #747
Description
Checklist
CHANGELOG.md
and added information about my change to the "dbt-databricks next" section.