dbt-labs / dbt-labs/dbt-adapters

BigQuery tags do not work

Open
#565 6 comments 0 reactions 1 assignee Claimed by @dataders View on GitHub
needs:docs pkg:dbt-bigquery type:enhancement
Dominant language
Python
Stars
233
Forks
362
Avg merge
3d 22h
Merged PRs (30d)
9

Description

### Is this a new bug in dbt-bigquery?

- [X] I believe this is a new bug in dbt-bigquery
- [X] I have searched the existing issues, and I could not find an existing issue for this bug

### Current Behavior

dbt labels with an empty string for the label value produce a BigQuery label with empty value, but no BigQuery tag.

Screenshot of the BigQuery table details:
![Screenshot 2024-04-24 115151](https://github.com/dbt-labs/dbt-adapters/assets/149587354/720c3919-89ea-4817-b146-67b6be476937)

### Expected Behavior

Per [dbt-bigquery documentation](https://docs.getdbt.com/reference/resource-configs/bigquery-configs#specifying-tags) I expect the dbt label with empty value to result in a BigQuery tag.

### Steps To Reproduce

Model file:

```sql
{{
config(
materialized = "table",
labels = {'contains_pii':''}
)
}}

select 1 as num, "text" as txt
```

Run model and inspect table details in BigQuery.

### Relevant log output

_No response_

### Environment

```markdown
- OS: Ubuntu 22.04.3
- Python: 3.10.12
- dbt-core: 1.7.13
- dbt-bigquery: 1.7.7
```

### Additional Context

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.