-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
23 changed files
with
155 additions
and
112 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 @@ | ||
## dbt-adapter 1.1.0 - May 01, 2024 | ||
|
||
### Features | ||
|
||
* Debug log when `type_code` fails to convert to a `data_type` | ||
* Introduce TableLastModifiedMetadataBatch and implement BaseAdapter.calculate_freshness_from_metadata_batch | ||
* Support for sql fixtures in unit testing | ||
* Cross-database `cast` macro | ||
* Allow adapters to opt out of aliasing the subquery generated by render_limited | ||
* subquery alias generated by render_limited now includes the relation name to mitigate duplicate aliasing | ||
|
||
### Fixes | ||
|
||
* Fix adapter-specific cast handling for constraint enforcement | ||
|
||
### Docs | ||
|
||
* Use `dbt-adapters` throughout the contributing guide | ||
|
||
### Under the Hood | ||
|
||
* Add the option to set the log level of the AdapterRegistered event | ||
* Update dependabot config to cover GHA | ||
* Validate that dbt-core and dbt-adapters remain de-coupled | ||
* remove dbt_version from query comment test fixture | ||
|
||
### Dependencies | ||
|
||
* add support for py3.12 |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 @@ | ||
## dbt-adapter 1.8.0-rc1 - May 01, 2024 |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,6 @@ | ||
kind: Features | ||
body: Cross-database `date` macro | ||
time: 2024-05-01T09:16:04.909686-06:00 | ||
custom: | ||
Author: dbeatty10 | ||
Issue: https://github.com/dbt-labs/dbt-core/issues/8831 |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 +1 @@ | ||
version = "1.8.0b1" | ||
version = "1.8.0rc1" |
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,45 @@ | ||
# date | ||
|
||
models__test_date_sql = """ | ||
with generated_dates as ( | ||
{{ | ||
dbt.date_spine( | ||
"day", | ||
date(2023, 9, 7), | ||
date(2023, 9, 10), | ||
) | ||
}} | ||
), | ||
expected_dates as ( | ||
select cast('2023-09-07' as date) as expected | ||
union all | ||
select cast('2023-09-08' as date) as expected | ||
union all | ||
select cast('2023-09-09' as date) as expected | ||
), | ||
joined as ( | ||
select | ||
generated_dates.date_day, | ||
expected_dates.expected | ||
from generated_dates | ||
full outer join expected_dates on generated_dates.date_day = expected_dates.expected | ||
) | ||
select * from joined | ||
""" | ||
|
||
models__test_date_yml = """ | ||
version: 2 | ||
models: | ||
- name: test_date | ||
data_tests: | ||
- assert_equal: | ||
actual: date_day | ||
expected: expected | ||
""" |
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,18 @@ | ||
import pytest | ||
|
||
from dbt.tests.adapter.utils import base_utils, fixture_date | ||
|
||
|
||
class BaseDate(base_utils.BaseUtils): | ||
@pytest.fixture(scope="class") | ||
def models(self): | ||
return { | ||
"test_date.yml": fixture_date.models__test_date_yml, | ||
"test_date.sql": self.interpolate_macro_namespace( | ||
fixture_date.models__test_date_sql, "date" | ||
), | ||
} | ||
|
||
|
||
class TestDate(BaseDate): | ||
pass |
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 +1 @@ | ||
version = "1.1.0rc1" | ||
version = "1.1.0" |
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,10 @@ | ||
{% macro date(year, month, day) %} | ||
{{ return(adapter.dispatch('date', 'dbt') (year, month, day)) }} | ||
{% endmacro %} | ||
|
||
|
||
{% macro default__date(year, month, day) -%} | ||
{%- set dt = modules.datetime.date(year, month, day) -%} | ||
{%- set iso_8601_formatted_date = dt.strftime('%Y-%m-%d') -%} | ||
to_date('{{ iso_8601_formatted_date }}', 'YYYY-MM-DD') | ||
{%- endmacro %} |