Repository: dbt-labs/dbt-core

Issue:
Seed descriptions are not persisted on BigQuery
### Describe the bug
When `persist_docs` is configured to persist descriptions for BigQuery relations, the resulting seed tables in BigQuery are not build with relation-level descriptions.

### Steps To Reproduce
```
# dbt_project.yml
config-version: 2
seeds:
    +persist_docs:
      relation: true
      columns: true
```

```
# models/schema.yml
version: 2
seeds:
  - name: my_seed
    description: my seed
    columns:
      - name: the_column
        description: column description
```

```
$ dbt seed
```

The resulting relation is not configured with a description in BigQuery.

### Expected behavior
I expect to see a configured description in BigQuery for the seed table.

### System information
**Which database are you using dbt with?**
- [ ] postgres
- [ ] redshift
- [x] bigquery
- [ ] snowflake
- [ ] other (specify: ____________)


**The output of `dbt --version`:**
```
dbt v0.17.1-rc2
```


Discussion:
Note: the column descriptions _are_ being persisted.
We create seeds on bigquery via `load_table_from_file`, which doesn't let us set a description as far as I can tell. We'll have to add a second step that adds a comment after the fact.

Resolving patch:
diff --git a/plugins/bigquery/dbt/adapters/bigquery/impl.py b/plugins/bigquery/dbt/adapters/bigquery/impl.py
--- a/plugins/bigquery/dbt/adapters/bigquery/impl.py
+++ b/plugins/bigquery/dbt/adapters/bigquery/impl.py
@@ -615,6 +615,23 @@ def update_column_descriptions(self, relation, columns):
         new_table = google.cloud.bigquery.Table(table_ref, schema=new_schema)
         conn.handle.update_table(new_table, ['schema'])
 
+    @available.parse_none
+    def update_table_description(
+        self, database: str, schema: str, identifier: str, description: str
+    ):
+        conn = self.connections.get_thread_connection()
+        client = conn.handle
+
+        table_ref = self.connections.table_ref(
+            database,
+            schema,
+            identifier,
+            conn
+        )
+        table = client.get_table(table_ref)
+        table.description = description
+        client.update_table(table, ['description'])
+
     @available.parse_none
     def alter_table_add_columns(self, relation, columns):
 


Test patch:
diff --git a/test/integration/060_persist_docs_tests/data/seed.csv b/test/integration/060_persist_docs_tests/data/seed.csv
new file mode 100644
--- /dev/null
+++ b/test/integration/060_persist_docs_tests/data/seed.csv
@@ -0,0 +1,3 @@
+id,name
+1,Alice
+2,Bob
diff --git a/test/integration/060_persist_docs_tests/models/schema.yml b/test/integration/060_persist_docs_tests/models/schema.yml
--- a/test/integration/060_persist_docs_tests/models/schema.yml
+++ b/test/integration/060_persist_docs_tests/models/schema.yml
@@ -43,3 +43,28 @@ models:
           --
           /* comment */
           Some $lbl$ labeled $lbl$ and $$ unlabeled $$ dollar-quoting
+
+seeds:
+  - name: seed
+    description: |
+      Seed model description "with double quotes"
+      and with 'single  quotes' as welll as other;
+      '''abc123'''
+      reserved -- characters
+      --
+      /* comment */
+      Some $lbl$ labeled $lbl$ and $$ unlabeled $$ dollar-quoting
+    columns:
+      - name: id
+        description: |
+          id Column description "with double quotes"
+          and with 'single  quotes' as welll as other;
+          '''abc123'''
+          reserved -- characters
+          --
+          /* comment */
+          Some $lbl$ labeled $lbl$ and $$ unlabeled $$ dollar-quoting
+      - name: name
+        description: |
+          Some stuff here and then a call to
+          {{ doc('my_fun_doc')}}
diff --git a/test/integration/060_persist_docs_tests/test_persist_docs.py b/test/integration/060_persist_docs_tests/test_persist_docs.py
--- a/test/integration/060_persist_docs_tests/test_persist_docs.py
+++ b/test/integration/060_persist_docs_tests/test_persist_docs.py
@@ -148,7 +148,15 @@ def project_config(self):
                         "columns": True,
                     },
                 }
-            }
+            },
+            'seeds': {
+                'test': {
+                    '+persist_docs': {
+                        "relation": True,
+                        "columns": True,
+                    },
+                }
+            },
         }
 
     @use_profile('snowflake')
@@ -157,7 +165,31 @@ def test_snowflake_persist_docs(self):
 
     @use_profile('bigquery')
     def test_bigquery_persist_docs(self):
+        self.run_dbt(['seed'])
         self.run_dbt()
+        desc_map = {
+            'seed': 'Seed model description',
+            'table_model': 'Table model description',
+            'view_model': 'View model description',
+        }
+        for node_id in ['seed', 'table_model', 'view_model']:
+            with self.adapter.connection_named('_test'):
+                client = self.adapter.connections \
+                    .get_thread_connection().handle
+
+                table_id = "{}.{}.{}".format(
+                    self.default_database,
+                    self.unique_schema(),
+                    node_id
+                )
+                bq_table = client.get_table(table_id)
+
+                bq_schema = bq_table.schema
+
+                assert bq_table.description.startswith(desc_map[node_id])
+                assert bq_schema[0].description.startswith('id Column description ')
+                if not node_id.startswith('view'):
+                    assert bq_schema[1].description.startswith('Some stuff here and then a call to')
 
 
 class TestPersistDocsNested(BasePersistDocsTest):
@@ -187,13 +219,14 @@ def test_bigquery_persist_docs(self):
 
         Next, generate the catalog and check if the comments are also included.
         """
+        self.run_dbt(['seed'])
         self.run_dbt()
 
         self.run_dbt(['docs', 'generate'])
         with open('target/catalog.json') as fp:
             catalog_data = json.load(fp)
         assert 'nodes' in catalog_data
-        assert len(catalog_data['nodes']) == 2  # table and view model
+        assert len(catalog_data['nodes']) == 3  # seed, table, and view model
 
         for node_id in ['table_model_nested', 'view_model_nested']:
             # check the descriptions using the api