Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Contract Enforcement Error with PK #494

Open
jckardos opened this issue Mar 26, 2024 · 2 comments
Open

Contract Enforcement Error with PK #494

jckardos opened this issue Mar 26, 2024 · 2 comments

Comments

@jckardos
Copy link

models:

  • name: apprenticeship_history
    description: cust_apprenticeships
    config:
    unique_key: apprenticeship_history_hk
    contract:
    enforced: true
    constraints:
    • type: primary_key
      columns:
      • apprenticeship_history_hk
        name: pk_apprenticeship_history

generates the following error on build/run

'fabric__table_columns_and_constraints' is undefined

in macro create_table_as (macros\relations\table\create.sql)
called by macro default__get_create_table_as_sql (macros\relations\table\create.sql)
called by macro get_create_table_as_sql (macros\relations\table\create.sql)
called by macro statement (macros\etc\statement.sql)
called by macro materialization_table_fabric (macros\materializations\models\table\table.sql)
called by model apprenticeship_history (models\silver\success_factors\apprenticeship_history.sql)

@stephan-meier
Copy link

stephan-meier commented May 6, 2024

I get the same error message with every contract I try on Azure SQL DB, even with zero constraints.
dbt-core 1.7.12, dbt-sqlserver 1.7.4

@mmc00
Copy link

mmc00 commented May 8, 2024

Sorry previous pull request wasn't test it. It's related with the changes in fabric #500

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants