Skip to content

[BUG] dbt_coves/templates not working as expected #495

@davidggphy

Description

@davidggphy

Describe the bug
I created a custom model_props.ylm template, to ensure that all my models enforce the contract.

To Reproduce
Steps to reproduce the behaviour:

  1. Run command "dbt-coves generate templates"
  2. cd into the folder ".dbt_coves/templates/" and edit model_props.ylm
version: 2

models:
  - name: {{ model.lower() }}
    description: ""
    config:
      contract:
        enforced: true
    columns:
{%- for col in columns %}
      - name: {{ col['id'] }}
      {%- if col['description'] %}
        description: "{{ col['description'] }}"
      {%- endif %}
{%- endfor %}
  1. Run dbt-coves generate properties --templates-folder .dbt_coves/templates/ , select all models and "Update all"

Expected behaviour
A clear and concise description of what you expected to happen.

I would expect that all models would get the following extra lines:

    config:
      contract:
        enforced: true

Desktop (please complete the following information):

  • OS: macOS 14.6.1 (23G93)
  • dbt-coves Version: 1.8.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriaged: noHasn't been approved for future implementation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions