From 64e9da7bde99cc89e4755d6156c6728ab1eadf50 Mon Sep 17 00:00:00 2001 From: Matthew McKnight <91097623+McKnight-42@users.noreply.github.com> Date: Fri, 5 Aug 2022 13:01:40 -0500 Subject: [PATCH] [Feature ] implement changie in dbt-bigquery (#253) * init pr for changie swap over in dbt-bigquery * typo fix * convert 1.3 changelog including batch and merge * changelog entry --- .changes/0.0.0.md | 5 + .changes/1.3.0-b1.md | 6 + .changes/1.3.0/Features-20220804-154944.yaml | 8 + .changes/1.3.0/Features-20220804-155057.yaml | 7 + .../1.3.0/Under the Hood-20220804-155219.yaml | 7 + .changes/README.md | 3 + .changes/header.tpl.md | 6 + .changes/unreleased/.gitkeep | 0 .../Under the Hood-20220804-155719.yaml | 7 + .changie.yaml | 60 +++++++ .github/pull_request_template.md | 2 +- .github/workflows/bot-changelog.yml | 61 +++++++ .github/workflows/changelog-existence.yml | 41 +++++ CHANGELOG.md | 150 ++---------------- CONTRIBUTING.md | 9 ++ 15 files changed, 237 insertions(+), 135 deletions(-) create mode 100644 .changes/0.0.0.md create mode 100644 .changes/1.3.0-b1.md create mode 100644 .changes/1.3.0/Features-20220804-154944.yaml create mode 100644 .changes/1.3.0/Features-20220804-155057.yaml create mode 100644 .changes/1.3.0/Under the Hood-20220804-155219.yaml create mode 100644 .changes/README.md create mode 100644 .changes/header.tpl.md create mode 100644 .changes/unreleased/.gitkeep create mode 100644 .changes/unreleased/Under the Hood-20220804-155719.yaml create mode 100644 .changie.yaml create mode 100644 .github/workflows/bot-changelog.yml create mode 100644 .github/workflows/changelog-existence.yml diff --git a/.changes/0.0.0.md b/.changes/0.0.0.md new file mode 100644 index 000000000..9c545f562 --- /dev/null +++ b/.changes/0.0.0.md @@ -0,0 +1,5 @@ +## Previous Releases +For information on prior major and minor releases, see their changelogs: +- [1.2](https://github.com/dbt-labs/dbt-bigquery/blob/1.2.latest/CHANGELOG.md) +- [1.1](https://github.com/dbt-labs/dbt-bigquery/blob/1.1.latest/CHANGELOG.md) +- [1.0](https://github.com/dbt-labs/dbt-bigquery/blob/1.0.latest/CHANGELOG.md) diff --git a/.changes/1.3.0-b1.md b/.changes/1.3.0-b1.md new file mode 100644 index 000000000..9d296a9bb --- /dev/null +++ b/.changes/1.3.0-b1.md @@ -0,0 +1,6 @@ +## dbt-bigquery 1.3.0-b1 - August 04, 2022 +### Features +- Implement `create_schema` via SQL, instead of Python method, allowing users to override if desired. drop_schema remains a Python method for the time being. ([#182](https://github.com/dbt-labs/dbt-bigquery/issues/182), [#183](https://github.com/dbt-labs/dbt-bigquery/pull/183)) +- Added table and incrementail materializations for python models via DataProc. ([#209](https://github.com/dbt-labs/dbt-bigquery/issues/209), [#226](https://github.com/dbt-labs/dbt-bigquery/pull/226)) +### Under the Hood +- Implement minimal changes to support dbt Core incremental materialization refactor. ([#232](https://github.com/dbt-labs/dbt-bigquery/issues/232), [#223](https://github.com/dbt-labs/dbt-bigquery/pull/223)) diff --git a/.changes/1.3.0/Features-20220804-154944.yaml b/.changes/1.3.0/Features-20220804-154944.yaml new file mode 100644 index 000000000..65bd2b32e --- /dev/null +++ b/.changes/1.3.0/Features-20220804-154944.yaml @@ -0,0 +1,8 @@ +kind: Features +body: 'Implement `create_schema` via SQL, instead of Python method, allowing users + to override if desired. drop_schema remains a Python method for the time being. ' +time: 2022-08-04T15:49:44.409354-05:00 +custom: + Author: jtcohen6 + Issue: "182" + PR: "183" diff --git a/.changes/1.3.0/Features-20220804-155057.yaml b/.changes/1.3.0/Features-20220804-155057.yaml new file mode 100644 index 000000000..39bd6ad45 --- /dev/null +++ b/.changes/1.3.0/Features-20220804-155057.yaml @@ -0,0 +1,7 @@ +kind: Features +body: Added table and incrementail materializations for python models via DataProc. +time: 2022-08-04T15:50:57.234209-05:00 +custom: + Author: stu-k + Issue: "209" + PR: "226" diff --git a/.changes/1.3.0/Under the Hood-20220804-155219.yaml b/.changes/1.3.0/Under the Hood-20220804-155219.yaml new file mode 100644 index 000000000..f5e6b2d9c --- /dev/null +++ b/.changes/1.3.0/Under the Hood-20220804-155219.yaml @@ -0,0 +1,7 @@ +kind: Under the Hood +body: Implement minimal changes to support dbt Core incremental materialization refactor. +time: 2022-08-04T15:52:19.342843-05:00 +custom: + Author: gshank + Issue: "232" + PR: "223" diff --git a/.changes/README.md b/.changes/README.md new file mode 100644 index 000000000..d82835028 --- /dev/null +++ b/.changes/README.md @@ -0,0 +1,3 @@ +# CHANGELOG + +To view information about the changelog operation we suggest reading this [README](https://github.com/dbt-labs/dbt-core/blob/main/.changes/README.md) found in `dbt-core`. diff --git a/.changes/header.tpl.md b/.changes/header.tpl.md new file mode 100644 index 000000000..b0468a97e --- /dev/null +++ b/.changes/header.tpl.md @@ -0,0 +1,6 @@ +# dbt-bigquery Changelog + +- This file provides a full account of all changes to `dbt-bigquery`. +- Changes are listed under the (pre)release in which they first appear. Subsequent releases include changes from previous releases. +- "Breaking changes" listed under a version may require action from end users or external maintainers when upgrading to that version. +- Do not edit this file directly. This file is auto-generated using [changie](https://github.com/miniscruff/changie). For details on how to document a change, see [the contributing guide](https://github.com/dbt-labs/dbt-bigquery/blob/main/CONTRIBUTING.md#adding-changelog-entry) diff --git a/.changes/unreleased/.gitkeep b/.changes/unreleased/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/.changes/unreleased/Under the Hood-20220804-155719.yaml b/.changes/unreleased/Under the Hood-20220804-155719.yaml new file mode 100644 index 000000000..631333c02 --- /dev/null +++ b/.changes/unreleased/Under the Hood-20220804-155719.yaml @@ -0,0 +1,7 @@ +kind: Under the Hood +body: Add changie to dbt-bigquery +time: 2022-08-04T15:57:19.060995-05:00 +custom: + Author: mcknight-42 + Issue: "254" + PR: "253" diff --git a/.changie.yaml b/.changie.yaml new file mode 100644 index 000000000..4a58d32e0 --- /dev/null +++ b/.changie.yaml @@ -0,0 +1,60 @@ +changesDir: .changes +unreleasedDir: unreleased +headerPath: header.tpl.md +versionHeaderPath: "" +changelogPath: CHANGELOG.md +versionExt: md +versionFormat: '## dbt-bigquery {{.Version}} - {{.Time.Format "January 02, 2006"}}' +kindFormat: '### {{.Kind}}' +changeFormat: '- {{.Body}} ([#{{.Custom.Issue}}](https://github.com/dbt-labs/dbt-bigquery/issues/{{.Custom.Issue}}), [#{{.Custom.PR}}](https://github.com/dbt-labs/dbt-bigquery/pull/{{.Custom.PR}}))' +kinds: +- label: Breaking Changes +- label: Features +- label: Fixes +- label: Under the Hood +- label: Dependencies +- label: Security +custom: +- key: Author + label: GitHub Username(s) (separated by a single space if multiple) + type: string + minLength: 3 +- key: Issue + label: GitHub Issue Number + type: int + minLength: 4 +- key: PR + label: GitHub Pull Request Number + type: int + minLength: 4 +footerFormat: | + {{- $contributorDict := dict }} + {{- /* any names added to this list should be all lowercase for later matching purposes */}} + {{- $core_team := list "emmyoop" "nathaniel-may" "gshank" "leahwicz" "chenyulinx" "stu-k" "iknox-fa" "versusfacit" "mcknight-42" "jtcohen6" "dependabot[bot]" "snyk-bot" }} + {{- range $change := .Changes }} + {{- $authorList := splitList " " $change.Custom.Author }} + {{- /* loop through all authors for a PR */}} + {{- range $author := $authorList }} + {{- $authorLower := lower $author }} + {{- /* we only want to include non-core team contributors */}} + {{- if not (has $authorLower $core_team)}} + {{- $pr := $change.Custom.PR }} + {{- /* check if this contributor has other PRs associated with them already */}} + {{- if hasKey $contributorDict $author }} + {{- $prList := get $contributorDict $author }} + {{- $prList = append $prList $pr }} + {{- $contributorDict := set $contributorDict $author $prList }} + {{- else }} + {{- $prList := list $change.Custom.PR }} + {{- $contributorDict := set $contributorDict $author $prList }} + {{- end }} + {{- end}} + {{- end}} + {{- end }} + {{- /* no indentation here for formatting so the final markdown doesn't have unneeded indentations */}} + {{- if $contributorDict}} + ### Contributors + {{- range $k,$v := $contributorDict }} + - [@{{$k}}](https://github.com/{{$k}}) ({{ range $index, $element := $v }}{{if $index}}, {{end}}[#{{$element}}](https://github.com/dbt-labs/dbt-bigquery/pull/{{$element}}){{end}}) + {{- end }} + {{- end }} diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index beedab7ad..e15849215 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -18,4 +18,4 @@ resolves # - [ ] I have signed the [CLA](https://docs.getdbt.com/docs/contributor-license-agreements) - [ ] I have run this code in development and it appears to resolve the stated issue - [ ] This PR includes tests, or tests are not required/relevant for this PR -- [ ] I have updated the `CHANGELOG.md` and added information about my change to the "dbt-bigquery next" section. +- [ ] I have run `changie new` to [create a changelog entry](https://github.com/dbt-labs/dbt-core/blob/main/CONTRIBUTING.md#Adding-CHANGELOG-Entry) diff --git a/.github/workflows/bot-changelog.yml b/.github/workflows/bot-changelog.yml new file mode 100644 index 000000000..2a141f849 --- /dev/null +++ b/.github/workflows/bot-changelog.yml @@ -0,0 +1,61 @@ +# **what?** +# When bots create a PR, this action will add a corresponding changie yaml file to that +# PR when a specific label is added. +# +# The file is created off a template: +# +# kind: +# body: +# time: +# custom: +# Author: +# Issue: 4904 +# PR: +# +# **why?** +# Automate changelog generation for more visability with automated bot PRs. +# +# **when?** +# Once a PR is created, label should be added to PR before or after creation. You can also +# manually trigger this by adding the appropriate label at any time. +# +# **how to add another bot?** +# Add the label and changie kind to the include matrix. That's it! +# + +name: Bot Changelog + +on: + pull_request: + # catch when the PR is opened with the label or when the label is added + types: [opened, labeled] + +permissions: + contents: write + pull-requests: read + +jobs: + generate_changelog: + strategy: + matrix: + include: + - label: "dependencies" + changie_kind: "Dependency" + - label: "snyk" + changie_kind: "Security" + runs-on: ubuntu-latest + + steps: + + - name: Create and commit changelog on bot PR + if: "contains(github.event.pull_request.labels.*.name, ${{ matrix.label }})" + id: bot_changelog + uses: emmyoop/changie_bot@v1.0 + with: + GITHUB_TOKEN: ${{ secrets.FISHTOWN_BOT_PAT }} + commit_author_name: "Github Build Bot" + commit_author_email: "" + commit_message: "Add automated changelog yaml from template for bot PR" + changie_kind: ${{ matrix.changie_kind }} + label: ${{ matrix.label }} + custom_changelog_string: "custom:\n Author: ${{ github.event.pull_request.user.login }}\n Issue: 216\n PR: ${{ github.event.pull_request.number }}\n" diff --git a/.github/workflows/changelog-existence.yml b/.github/workflows/changelog-existence.yml new file mode 100644 index 000000000..ea5e0dffd --- /dev/null +++ b/.github/workflows/changelog-existence.yml @@ -0,0 +1,41 @@ +# **what?** +# Checks that a file has been committed under the /.changes directory +# as a new CHANGELOG entry. Cannot check for a specific filename as +# it is dynamically generated by change type and timestamp. +# This workflow should not require any secrets since it runs for PRs +# from forked repos. +# By default, secrets are not passed to workflows running from +# a forked repo. + +# **why?** +# Ensure code change gets reflected in the CHANGELOG. + +# **when?** +# This will run for all PRs going into main and *.latest. It will +# run when they are opened, reopened, when any label is added or removed +# and when new code is pushed to the branch. The action will then get +# skipped if the 'Skip Changelog' label is present is any of the labels. + +name: Check Changelog Entry + +on: + pull_request: + types: [opened, reopened, labeled, unlabeled, synchronize] + workflow_dispatch: + +defaults: + run: + shell: bash + +permissions: + contents: read + pull-requests: write + + +jobs: + changelog: + uses: dbt-labs/actions/.github/workflows/changelog-existence.yml@main + with: + changelog_comment: 'Thank you for your pull request! We could not find a changelog entry for this change. For details on how to document a change, see [the dbt-core contributing guide](https://github.com/dbt-labs/dbt-core/blob/main/CONTRIBUTING.md#adding-changelog-entry), and the [dbt-bigquery contriubuting guide](https://github.com/dbt-labs/dbt-bigquery/blob/main/CONTRIBUTING.MD).' + skip_label: 'Skip Changelog' + secrets: inherit # this is only acceptable because we own the action we're calling diff --git a/CHANGELOG.md b/CHANGELOG.md index f6a823c3d..93ea208a1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,137 +1,19 @@ -## dbt-bigquery 1.3.0b2 (Release TBD) +# dbt-bigquery Changelog -## dbt-bigquery 1.3.0b1 (July 29, 2020) +- This file provides a full account of all changes to `dbt-bigquery`. +- Changes are listed under the (pre)release in which they first appear. Subsequent releases include changes from previous releases. +- "Breaking changes" listed under a version may require action from end users or external maintainers when upgrading to that version. +- Do not edit this file directly. This file is auto-generated using [changie](https://github.com/miniscruff/changie). For details on how to document a change, see [the contributing guide](https://github.com/dbt-labs/dbt-bigquery/blob/main/CONTRIBUTING.md#adding-changelog-entry) +## dbt-bigquery 1.3.0-b1 - August 04, 2022 ### Features -- Implement `create_schema` via SQL, instead of Python method, allowing users to override if desired. `drop_schema` remains a Python method for the time being. ([#182](https://github.com/dbt-labs/dbt-bigquery/issues/182), [#183](https://github.com/dbt-labs/dbt-bigquery/pull/183)) -- Added table and incrementail materializations for python models via DataProc. ([#209](https://github.com/dbt-labs/dbt-bigquery/pull/209), [#226](https://github.com/dbt-labs/dbt-bigquery/pull/226)) - -### Under the hood -- Implement minimal changes to support dbt Core incremental materialization refactor. ([#232](http://github.com/dbt-labs/dbt-bigquery/issues/232), [#223](https://github.com/dbt-labs/dbt-biquery/pull/223)) - -## dbt-bigquery 1.2.0rc1 (June 12, 2022) - -### Features -- Add grants to materializations ([#198](https://github.com/dbt-labs/dbt-bigquery/issues/198), [#212](https://github.com/dbt-labs/dbt-bigquery/pull/212)) - -### Under the hood -- Modify `BigQueryColumn.numeric_type` to always exclude precision + scale, since the functionality of ["parametrized data types on BigQuery](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types#parameterized_data_types) is highly constrained ([#214](https://github.com/dbt-labs/dbt-bigquery/pull/214)) - -## dbt-bigquery 1.2.0b1 (June 24, 2022) - -### Fixes -- Incorrect parameter is passed to the bq_insert_overwrite macro call ([#172](https://github.com/dbt-labs/dbt-bigquery/pull/172)) -- Fix validate connection failing ([#168](https://github.com/dbt-labs/dbt-bigquery/pull/168)) - -### Under the hood -- Adding Python 3.10 testing and enabling mypy ([#177](https://github.com/dbt-labs/dbt-bigquery/pull/177)) -- Lift and shift cross-database macros from dbt-utils ([#192](https://github.com/dbt-labs/dbt-bigquery/pull/192) -- Implement TestDocsGenerateBigQuery test ([#190](https://github.com/dbt-labs/dbt-bigquery/pull/190)) -- Init push for pytest conversion of override_database for bigquery ([#165](https://github.com/dbt-labs/dbt-bigquery/pull/165), [#188](https://github.com/dbt-labs/dbt-bigquery/pull/188)) -- Add oauth test target as default ([#166](https://github.com/dbt-labs/dbt-bigquery/pull/166)) - -### Contributors -- [@robomill](https://github.com/robomill) ([#172](https://github.com/dbt-labs/dbt-bigquery/pull/172)) -- [@dbeatty10](https://github.com/dbeatty10) ([#192](https://github.com/dbt-labs/dbt-bigquery/pull/192) - -## dbt-bigquery 1.1.0 (April 28, 2022) - -## dbt-bigquery 1.1.0rc2 (April 20, 2022) - -### Fixes -- Restore default behavior for query timeout. Set default `job_execution_timeout` to `None` by default. Keep 300 seconds as query timeout where previously used. - -## dbt-bigquery 1.1.0rc1 (April 13, 2022) - -### Under the hood -- Use dbt.tests.adapter.basic in tests (new test framework) ([#135](https://github.com/dbt-labs/dbt-bigquery/issues/135), [#142](https://github.com/dbt-labs/dbt-bigquery/pull/142)) -- Adding pre-commit and black formatter hooks ([#147](https://github.com/dbt-labs/dbt-bigquery/pull/147)) -- Adding pre-commit code changes ([#148](https://github.com/dbt-labs/dbt-bigquery/pull/148)) - -## dbt-bigquery 1.1.0b1 (March 23, 2022) -### Features -- Provide a fine-grained control of the timeout and retry of BigQuery query with four new dbt profile configs: `job_creation_timeout_seconds`, `job_execution_timeout_seconds`, `job_retry_deadline_seconds`, and `job_retries` ([#45](https://github.com/dbt-labs/dbt-bigquery/issues/45), [#50](https://github.com/dbt-labs/dbt-bigquery/pull/50)) -- Adds new integration test to check against new ability to allow unique_key to be a list. [#112](https://github.com/dbt-labs/dbt-bigquery/issues/112) -- Added upload_file macro to upload a local file to a table. [#102](https://github.com/dbt-labs/dbt-bigquery/issues/102) -- Add logic to BigQueryConnectionManager to add fuctionality for UPDATE and SELECT statements. [#79](https://github.com/dbt-labs/dbt-bigquery/pull/79) - -### Fixes -- Fix test related to preventing coercion of boolean values (True, False) to numeric values (0, 1) in query results ([#93](https://github.com/dbt-labs/dbt-bigquery/issues/93)) -- Add a check in `get_table_options` to check that the table has a `partition_by` in the config. -This will prevent BigQuery from throwing an error since non-partitioned tables cannot have `require_partition_filter` ([#107](https://github.com/dbt-labs/dbt-bigquery/issues/107)) -- Ignore errors of the lack of permissions in `list_relations_without_caching` ([#104](https://github.com/dbt-labs/dbt-bigquery/issues/104)) - -### Under the hood -- Address BigQuery API deprecation warning and simplify usage of `TableReference` and `DatasetReference` objects ([#97](https://github.com/dbt-labs/dbt-bigquery/issues/97)),([#98](https://github.com/dbt-labs/dbt-bigquery/pull/98)) -- Add contributing.md file for adapter repo [#73](https://github.com/dbt-labs/dbt-bigquery/pull/73) -- Add stale messaging workflow to Github Actions [#103](https://github.com/dbt-labs/dbt-bigquery/pull/103) -- Add unique_key to go in parity with unique_key as a list chagnes made in core [#119](https://github.com/dbt-labs/dbt-bigquery/pull/119/files) -- Adding new Enviornment variable for integration testing puproses [#116](https://github.com/dbt-labs/dbt-bigquery/pull/116) - -### Contributors -- [@hui-zheng](https://github.com/hui-zheng)([#50](https://github.com/dbt-labs/dbt-bigquery/pull/50)) -- [@oliverrmaa](https://github.com/oliverrmaa)([#109](https://github.com/dbt-labs/dbt-bigquery/pull/109)) -- [@yu-iskw](https://github.com/yu-iskw)([#108](https://github.com/dbt-labs/dbt-bigquery/pull/108)) -- [@pgoslatara](https://github.com/pgoslatara) ([#66](https://github.com/dbt-labs/dbt-bigquery/pull/121)) -- [@drewmcdonald](https://github.com/drewmcdonald)([#98](https://github.com/dbt-labs/dbt-bigquery/pull/98)) -- [@rjh336](https://github.com/rjh336)([#79](https://github.com/dbt-labs/dbt-bigquery/pull/79)) - -## dbt-bigquery 1.0.0 (December 3, 2021) - -## dbt-bigquery 1.0.0rc2 (November 24, 2021) - -### Features -- Add optional `scopes` profile configuration argument to reduce the BigQuery OAuth scopes down to the minimal set needed. ([#23](https://github.com/dbt-labs/dbt-bigquery/issues/23), [#63](https://github.com/dbt-labs/dbt-bigquery/pull/63)) - -### Fixes -- Don't apply `require_partition_filter` to temporary tables, thereby fixing `insert_overwrite` strategy when partition filter is required ([#64](https://github.com/dbt-labs/dbt-bigquery/issues/64)), ([#65](https://github.com/dbt-labs/dbt-bigquery/pull/65)) - -### Under the hood -- Adding `execution_project` to `target` object ([#66](https://github.com/dbt-labs/dbt-bigquery/issues/66)) - -### Contributors -- [@pgoslatara](https://github.com/pgoslatara) ([#66](https://github.com/dbt-labs/dbt-bigquery/issues/66)) -- [@bborysenko](https://github.com/bborysenko) ([#63](https://github.com/dbt-labs/dbt-bigquery/pull/63)) -- [@hui-zheng](https://github.com/hui-zheng)([#50](https://github.com/dbt-labs/dbt-bigquery/pull/50)) -- [@yu-iskw](https://github.com/yu-iskw) ([#65](https://github.com/dbt-labs/dbt-bigquery/pull/65)) - -## dbt-bigquery 1.0.0rc1 (November 10, 2021) - -### Fixes -- Fix problem with bytes processed return None value when the service account used to connect DBT in bigquery had a row policy access. -([#47](https://github.com/dbt-labs/dbt-bigquery/issues/47), [#48](https://github.com/dbt-labs/dbt-bigquery/pull/48)) -- When on_schema_change is set, pass common columns as dest_columns in incremental merge macros ([#4144](https://github.com/dbt-labs/dbt-core/issues/4144)) - -### Under the hood -- Capping `google-api-core` to version `1.31.3` due to `protobuf` dependency conflict ([#53](https://github.com/dbt-labs/dbt-bigquery/pull/53)) -- Bump `google-cloud-core` and `google-api-core` upper bounds to `<3`, thereby removing `<1.31.3` limit on the latter. Remove explicit dependency on `six` ([#57](https://github.com/dbt-labs/dbt-bigquery/pull/57)) -- Remove official support for python 3.6, which is reaching end of life on December 23, 2021 ([dbt-core#4134](https://github.com/dbt-labs/dbt-core/issues/4134), [#59](https://github.com/dbt-labs/dbt-bigquery/pull/59)) -- Add support for structured logging [#55](https://github.com/dbt-labs/dbt-bigquery/pull/55) - -### Contributors -- [@imartynetz](https://github.com/imartynetz) ([#48](https://github.com/dbt-labs/dbt-bigquery/pull/48)) -- [@Kayrnt](https://github.com/Kayrnt) ([#51](https://github.com/dbt-labs/dbt-bigquery/pull/51)) - -## dbt-bigquery 1.0.0b2 (October 25, 2021) - -### Features - -- Rework `_dbt_max_partition` logic in dynamic `insert_overwrite` incremental strategy. Make the default logic compatible with `on_schema_change`, and make it possible to disable or reimplement that logic by defining a custom macro `declare_dbt_max_partition` ([#17](https://github.com/dbt-labs/dbt-bigquery/issues/17), [#39](https://github.com/dbt-labs/dbt-bigquery/issues/39), [#41](https://github.com/dbt-labs/dbt-bigquery/pull/41)) - -### Fixes -- Reimplement the `unique` test to handle column expressions and naming overlaps ([#33](https://github.com/dbt-labs/dbt-bigquery/issues/33), [#35](https://github.com/dbt-labs/dbt-bigquery/issues/35), [#10](https://github.com/dbt-labs/dbt-bigquery/pull/10)) -- Avoid error in `dbt deps` + `dbt clean` if default project is missing ([#27](https://github.com/dbt-labs/dbt-bigquery/issues/27), [#40](https://github.com/dbt-labs/dbt-bigquery/pull/40)) - -### Under the hood -- Replace `sample_profiles.yml` with `profile_template.yml`, for use with new `dbt init` ([#43](https://github.com/dbt-labs/dbt-bigquery/pull/43)) - -### Contributors - -- [@DigUpTheHatchet](https://github.com/DigUpTheHatchet) ([#10](https://github.com/dbt-labs/dbt-bigquery/pull/10)) -- [@jeremyyeo](https://github.com/jeremyyeo) ([#40](https://github.com/dbt-labs/dbt-bigquery/pull/40)) -- [@NiallRees](https://github.com/NiallRees) ([#43](https://github.com/dbt-labs/dbt-bigquery/pull/43)) - -## dbt-bigquery 1.0.0b1 (October 11, 2021) - -### Under the hood -- Initial adapter split out +- Implement `create_schema` via SQL, instead of Python method, allowing users to override if desired. drop_schema remains a Python method for the time being. ([#182](https://github.com/dbt-labs/dbt-bigquery/issues/182), [#183](https://github.com/dbt-labs/dbt-bigquery/pull/183)) +- Added table and incrementail materializations for python models via DataProc. ([#209](https://github.com/dbt-labs/dbt-bigquery/issues/209), [#226](https://github.com/dbt-labs/dbt-bigquery/pull/226)) +### Under the Hood +- Implement minimal changes to support dbt Core incremental materialization refactor. ([#232](https://github.com/dbt-labs/dbt-bigquery/issues/232), [#223](https://github.com/dbt-labs/dbt-bigquery/pull/223)) + +## Previous Releases +For information on prior major and minor releases, see their changelogs: +- [1.2](https://github.com/dbt-labs/dbt-bigquery/blob/1.2.latest/CHANGELOG.md) +- [1.1](https://github.com/dbt-labs/dbt-bigquery/blob/1.1.latest/CHANGELOG.md) +- [1.0](https://github.com/dbt-labs/dbt-bigquery/blob/1.0.latest/CHANGELOG.md) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index aec184e46..9b765784e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -89,6 +89,15 @@ Many changes will require and update to the `dbt-bigquery` docs here are some us - The changes made are likely to impact one or both of [BigQuery Profile](https://docs.getdbt.com/reference/warehouse-profiles/bigquery-profile), or [BigQuery Configs](https://docs.getdbt.com/reference/resource-configs/bigquery-configs). - We ask every community member who makes a user-facing change to open an issue or PR regarding doc changes. +## Adding CHANGELOG Entry + +We use [changie](https://changie.dev) to generate `CHANGELOG` entries. **Note:** Do not edit the `CHANGELOG.md` directly. Your modifications will be lost. + +Follow the steps to [install `changie`](https://changie.dev/guide/installation/) for your system. + +Once changie is installed and your PR is created, simply run `changie new` and changie will walk you through the process of creating a changelog entry. Commit the file that's created and your changelog entry is complete! + +You don't need to worry about which `dbt-bigquery` version your change will go into. Just create the changelog entry with `changie`, and open your PR against the `main` branch. All merged changes will be included in the next minor version of `dbt-bigquery`. The Core maintainers _may_ choose to "backport" specific changes in order to patch older minor versions. In that case, a maintainer will take care of that backport after merging your PR, before releasing the new version of `dbt-bigquery`. ## Submitting a Pull Request