Closed choudrybabu closed 1 year ago
i removed the MATCH SIMPLE RELY part of the above alter sql command and ran it manually in the db and it worked as expected
I'm going to address this conversation in this thread since the two issues are related:
we have added a test dbt_constraints.foreign_key: in a model yml file under the concerned column , dbt is executing an alter statement but somehow it isnt working in snowflake here is the sql command i see executed by dbt core on snowflake db
ALTER TABLE SUPPLY_TEAM ADD CONSTRAINT SUPPLY_TEAM_OFFICE_FK FOREIGN KEY ( OFFICE_ID ) REFERENCES OFFICE ( office_ID ) MATCH SIMPLE RELY
the above sql runs without any errors but i dont see it created on table, i checked the DDL and also ran show imported keys on the child table , i dont see FK in db table