Repository: dbt-labs/dbt-core

Issue:
Jinja not rendering for sources in 0.14.0
## 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: https://github.com/fishtown-analytics/dbt/issues/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.


Discussion:
Thanks @nydnarb - we'll check this one out!
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?
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.

Resolving patch:
diff --git a/core/dbt/parser/util.py b/core/dbt/parser/util.py
--- a/core/dbt/parser/util.py
+++ b/core/dbt/parser/util.py
@@ -161,6 +161,11 @@ def process_docs_for_source(cls, manifest, current_project, source):
         source.set('description', table_description)
         source.set('source_description', source_description)
 
+        for column_name, column_def in source.columns.items():
+            column_desc = column_def.get('description', '')
+            column_desc = dbt.clients.jinja.get_rendered(column_desc, context)
+            column_def['description'] = column_desc
+
     @classmethod
     def process_docs(cls, manifest, current_project):
         for node in manifest.nodes.values():


Test patch:
diff --git a/test/integration/029_docs_generate_tests/ref_models/docs.md b/test/integration/029_docs_generate_tests/ref_models/docs.md
--- a/test/integration/029_docs_generate_tests/ref_models/docs.md
+++ b/test/integration/029_docs_generate_tests/ref_models/docs.md
@@ -21,3 +21,7 @@ My source
 {% docs table_info %}
 My table
 {% enddocs %}
+
+{% docs column_info %}
+An ID field
+{% enddocs %}
diff --git a/test/integration/029_docs_generate_tests/ref_models/schema.yml b/test/integration/029_docs_generate_tests/ref_models/schema.yml
--- a/test/integration/029_docs_generate_tests/ref_models/schema.yml
+++ b/test/integration/029_docs_generate_tests/ref_models/schema.yml
@@ -28,4 +28,4 @@ sources:
           identifier: True
         columns:
           - name: id
-            description: "An ID field"
+            description: "{{ doc('column_info') }}"
diff --git a/test/integration/029_docs_generate_tests/test_docs_generate.py b/test/integration/029_docs_generate_tests/test_docs_generate.py
--- a/test/integration/029_docs_generate_tests/test_docs_generate.py
+++ b/test/integration/029_docs_generate_tests/test_docs_generate.py
@@ -1266,6 +1266,11 @@ def expected_postgres_references_manifest(self, model_database=None):
                     'database': self.default_database,
                     'description': 'My table',
                     'docrefs': [
+                         {
+                             "documentation_package": "",
+                             "documentation_name": "column_info",
+                             "column_name": "id",
+                         },
                          {
                              'documentation_name': 'table_info',
                              'documentation_package': ''
@@ -1294,6 +1299,17 @@ def expected_postgres_references_manifest(self, model_database=None):
             },
             'docs': {
                 'dbt.__overview__': ANY,
+                "test.column_info": {
+                    "block_contents": "An ID field",
+                    "file_contents": docs_file,
+                    "name": "column_info",
+                    "original_file_path": docs_path,
+                    "package_name": "test",
+                    "path": "docs.md",
+                    "resource_type": "docs",
+                    "root_path": OneOf(self.test_root_dir, self.initial_dir),
+                    "unique_id": "test.column_info",
+                },
                 'test.ephemeral_summary': {
                     'block_contents': (
                         'A summmary table of the ephemeral copy of the seed data'