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

[Regression] Policy tag error with 1.5.0 on BigQuery #712

Closed
2 tasks done
matfior-finn opened this issue May 11, 2023 · 1 comment
Closed
2 tasks done

[Regression] Policy tag error with 1.5.0 on BigQuery #712

matfior-finn opened this issue May 11, 2023 · 1 comment
Labels
type:bug Something isn't working type:regression

Comments

@matfior-finn
Copy link

matfior-finn commented May 11, 2023

Is this a regression in a recent version of dbt-bigquery?

  • I believe this is a regression in dbt-bigquery functionality
  • I have searched the existing issues, and I could not find an existing issue for this regression

Current Behavior

Running my models with the latest version of dbt gives me errors about policy tags which we are not using.

Only some models are failing but they do not have anything special about them.

Expected/Previous Behavior

No errors.

Steps To Reproduce

  1. Install latest version of dbt
  2. Run the models

Relevant log output

08:25  
15:08:25  400 PATCH https://bigquery.googleapis.com/bigquery/v2/projects/datawarehouse-304513/datasets/_dev_dataproducts_mf/tables/il_awin_transaction?prettyPrint=false: Policy tags can only be attached to a leaf field.
15:08:25  
15:08:25  400 PATCH https://bigquery.googleapis.com/bigquery/v2/projects/datawarehouse-304513/datasets/_dev_dataproducts_mf/tables/il_gcp_billing_export?prettyPrint=false: Policy tags can only be attached to a leaf field.
15:08:25  
15:08:25  400 PATCH https://bigquery.googleapis.com/bigquery/v2/projects/datawarehouse-304513/datasets/_dev_dataproducts_mf/tables/il_gcp_cloud_pricing_export?prettyPrint=false: Policy tags can only be attached to a leaf field.
15:08:25  
15:08:25  400 PATCH https://bigquery.googleapis.com/bigquery/v2/projects/datawarehouse-304513/datasets/_dev_dataproducts_mf/tables/b2b_sales_commissions?prettyPrint=false: Policy tags can only be attached to a leaf field.
15:08:25

Environment

- OS: MacOs 12.6.5
- Python: Python 3.9.6
- dbt-core (working version): 1.4.6
- dbt-bigquery (working version): 1.4.3
- dbt-core (regression version): 1.5.0
- dbt-bigquery (regression version): 1.5.0

Additional Context

No response

@github-actions github-actions bot changed the title [Regression] <title> [ADAP-546] [Regression] <title> May 11, 2023
@matfior-finn matfior-finn changed the title [ADAP-546] [Regression] <title> [Regression] Policy tag error with 1.5.0 on BigQuery May 11, 2023
@dbeatty10 dbeatty10 self-assigned this May 11, 2023
@dbeatty10
Copy link
Contributor

Thank you for reporting this @matfior-finn ! 🙏

I believe this is the same as #687, so I'm going to close this as a duplicate. We'll be doing a patch release that has the fix soon. Please reach out if it doesn't fix the issue you are seeing and we can re-open this.

You mentioned that you aren't using policy tags. This surprises me, because I think you wouldn't be getting this error otherwise. I'd suggest looking in your project (or dbt packages that you have installed) for configurations like shown below. Regardless, I believe the error messages you are seeing will be solved by the upcoming patch release mentioned above.

dbt_project.yml

name: "my_dbt_project"
version: "1.0.0"
config-version: 2
profile: "sandcastle-bigquery"

models:
  my_dbt_project:
    +persist_docs:
      relation: true
      columns: true

models/_models.yml

# version isn't required for dbt-core 1.5, but it is for 1.4
version: 2

models:
  - name: my_model
    columns:
      - name: id
        description: Primary key
        policy_tags:
          # Example pattern:
          # - 'projects/<gcp-project>/locations/<location>/taxonomies/<organization>/policyTags/<tag>'
          - projects/dbt-test-env/locations/us/taxonomies/5785568062805976401/policyTags/135489647357012267

@dbeatty10 dbeatty10 closed this as not planned Won't fix, can't repro, duplicate, stale May 11, 2023
@dbeatty10 dbeatty10 removed their assignment May 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Something isn't working type:regression
Projects
None yet
Development

No branches or pull requests

2 participants