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

Jinja not rendering for sources in 0.14.0 #1619

Closed
nydnarb opened this issue Jul 19, 2019 · 4 comments · Fixed by #1633
Closed

Jinja not rendering for sources in 0.14.0 #1619

nydnarb opened this issue Jul 19, 2019 · 4 comments · Fixed by #1633
Labels
bug Something isn't working
Milestone

Comments

@nydnarb
Copy link
Contributor

nydnarb commented Jul 19, 2019

Issue

Issue description and Results

While upgrading to 0.14.0, I noticed an issue with the documentation site. Column descriptions for sources were not having their Jinja rendered. For example, if my source YML looked like this

source:
  - name: foo
    description: "{{ doc('bar') }}"
    columns:
      - name: baz
        description: "{{ doc('qux') }}"

then on the documentation site I would see the string {{ doc('qux') }}.

However, this works just fine in 0.13.0. Furthermore, model descriptions and column descriptions for models are being rendered just fine.

Lastly, it appears this was an issue before and was previously fixed: #1484

System information

dbt versions 0.13.0 and 0.14.0
python version 2.7.10
Mac OS Mojave 10.14.5

Steps to reproduce

Here are snippets from my project. Also, the previously linked issue has a great explanation of how to reproduce:
sources.yml

version: 2

sources:
  - name: marketing_attribution
    tables:
      - name: account_lndc_attribution
        description: "{{ doc('marketing_attribution__account_lndc_attribution__description') }}"
        columns:
          - name: person_id
            description: "{{ doc('marketing_attribution__account_lndc_attribution__person_id') }}"
            tests:
              - not_null
              - unique
          - name: person_added_timestamp
            description: "{{ doc('marketing_attribution__account_lndc_attribution__person_added_timestamp') }}"
            tests:
              - not_null

sources.md

{% docs marketing_attribution__account_lndc_attribution__description %} Morbi in ipsum sit amet pede facilisis laoreet. Donec lacus nunc, viverra nec, blandit vel, egestas et, augue. Vestibulum tincidunt malesuada tellus. Ut ultrices ultrices enim. Curabitur sit amet mauris. Morbi in dui quis est pulvinar ullamcorper. {% enddocs %}

{% docs marketing_attribution__account_lndc_attribution__person_id %} Suspendisse potenti. Nunc feugiat mi a tellus consequat imperdiet. Vestibulum sapien. Proin quam. Etiam ultrices. Suspendisse in justo eu magna luctus suscipit. {% enddocs %}

{% docs marketing_attribution__account_lndc_attribution__person_added_timestamp %} Vestibulum lacinia arcu eget nulla. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Curabitur sodales ligula in libero. Sed dignissim lacinia nunc. Curabitur tortor. Pellentesque nibh. Aenean quam. In scelerisque sem at dolor. {% enddocs %}

Then, dbt docs generate && dbt docs serve.

EDIT

The issue only affects source columns. A previous version of this issue reported that it was an issue with the table level description as well.

@drewbanin drewbanin added this to the 0.14.1 milestone Jul 19, 2019
@drewbanin drewbanin added the bug Something isn't working label Jul 19, 2019
@drewbanin
Copy link
Contributor

Thanks @nydnarb - we'll check this one out!

@drewbanin
Copy link
Contributor

I can reproduce this specifically for column-level descriptions. Are you seeing that dbt fails to interpolate these descriptions specifically for columns, or are you seeing this same error for source-level / table-level descriptions?

@nydnarb
Copy link
Contributor Author

nydnarb commented Jul 19, 2019

Good catch! Yes, the description at the table level is fine. I'm only seeing the issue at column level. I updated the original issue to reflect this.

@drewbanin
Copy link
Contributor

Fixed in #1633 -- this is going out in 0.14.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants