-
Notifications
You must be signed in to change notification settings - Fork 112
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #45 from dbt-labs/dev/0.4.0
Merge dev/0.4.0 into main
- Loading branch information
Showing
10 changed files
with
144 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
# dbt-codegen v0.4.0 | ||
|
||
## Breaking changes | ||
- Requires `dbt>=0.20.0` and `dbt-utils>=0.7.0` | ||
- Depends on `dbt-labs/dbt_utils` (instead of `fishtown-analytics/dbt_utils`) | ||
|
||
## Features | ||
- Add optional `leading_commas` arg to `generate_base_model` (#41 @jaypeedevlin) | ||
- Add optional `include_descriptions` arg to `generate_source` (#40 @djbelknapdbs) | ||
|
||
## Fixes | ||
- In the `generate_source` macro, use `dbt_utils.get_relations_by_pattern` instead of `get_relations_by_prefix`, since the latter will be deprecated in the future (#42) | ||
|
||
## Under the hood | ||
- Use new adapter.dispatch syntax (#44) | ||
|
||
# dbt-codegen v0.3.2 | ||
|
||
This is a quality of life release | ||
|
||
## Other | ||
* Fix rendering issues on hub.getdbt.com | ||
* Fix integration tests due to python version compatibility | ||
|
||
# dbt-codegen v0.3.1 | ||
This is a bugfix release | ||
|
||
## Fixes | ||
- Use latest version of dbt-utils (0.6.2) to ensure generate_source_yaml works for non-target schemata (#34) | ||
|
||
# dbt-codegen v0.3.0 | ||
## 🚨 Breaking change | ||
This release requires dbt v0.18.0, and dbt-utils v0.6.1. If you're not ready to upgrade, consider using a previous release of this package. | ||
|
||
## Quality of life | ||
- Use dbt v0.18.0 (#31) | ||
- Fix README rendering on hub (#32 @calvingiles) | ||
|
||
# dbt-codegen v0.2.0 | ||
## 🚨 Breaking change | ||
The lower bound of `dbt-utils` is now `0.4.0`. | ||
|
||
This won't affect most users, since you're likely already using version of dbt-utils higher than this to achieve 0.17.0 compatibility. | ||
|
||
## Quality of life: | ||
- Change dbt-utils dependencies to `[>=0.4.0, <0.6.0]` (#29) | ||
- Fix tests (#29) | ||
|
||
# dbt-codegen v0.1.0 | ||
## 🚨 Breaking change! | ||
|
||
This package now requires dbt v0.17.x! | ||
|
||
## Features: | ||
* Add `generate_model_yaml` (#18 @jtalmi) | ||
|
||
|
||
## Under the hood: | ||
* Update to v0.17.0, including `dbt_project.yml` version 2 syntax (#23) | ||
* Add GitHub templates and installation instructions (#23) | ||
|
||
## Acknowledgements | ||
@marzaccaro made a PR for `generate_model_yaml`, and, although I had reviewed it, I let the PR go stale and somehow completely forgot about it when merging PR #18 — this is completely my bad! So equal credit to @marzaccaro and @jtalmi for their work :clap: | ||
|
||
# dbt-codegen v0.0.4 | ||
This is a bugfix release to improve compatibility with Snowflake | ||
|
||
# dbt-codegen v0.0.3 | ||
Bump utils version range | ||
|
||
# dbt-codegen v0.0.2 | ||
Small quality of life improvements | ||
|
||
# dbt-codegen v0.0.1 | ||
Initial release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
name: 'codegen' | ||
version: '1.0' | ||
version: '0.4.0' | ||
|
||
require-dbt-version: ">=0.18.0" | ||
config-version: 2 | ||
|
29 changes: 29 additions & 0 deletions
29
integration_tests/tests/test_generate_base_models_leading.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
|
||
{% set actual_base_model = codegen.generate_base_model( | ||
source_name='codegen_integration_tests__data_source_schema', | ||
table_name='codegen_integration_tests__data_source_table', | ||
leading_commas=True, | ||
) | ||
%} | ||
|
||
{% set expected_base_model %} | ||
with source as ( | ||
|
||
select * from {%raw%}{{ source('codegen_integration_tests__data_source_schema', 'codegen_integration_tests__data_source_table') }}{%endraw%} | ||
|
||
), | ||
|
||
renamed as ( | ||
|
||
select | ||
my_integer_col | ||
, my_bool_col | ||
|
||
from source | ||
|
||
) | ||
|
||
select * from renamed | ||
{% endset %} | ||
|
||
{{ assert_equal (actual_base_model | trim, expected_base_model | trim) }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
packages: | ||
- package: fishtown-analytics/dbt_utils | ||
version: [">=0.6.2", "<0.7.0"] | ||
- package: dbt-labs/dbt_utils | ||
version: [">=0.6.2", "<0.8.0"] |