Skip to content

Commit

Permalink
Merge branch 'main' into dbeatty/84-cast
Browse files Browse the repository at this point in the history
  • Loading branch information
dbeatty10 authored Apr 18, 2024
2 parents fface1d + 4774638 commit 64124d9
Show file tree
Hide file tree
Showing 10 changed files with 33 additions and 2 deletions.
12 changes: 12 additions & 0 deletions .changes/1.1.0-rc1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
## dbt-adapter 1.1.0-rc1 - April 17, 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

### Under the Hood

* Add the option to set the log level of the AdapterRegistered event
* Update dependabot config to cover GHA
6 changes: 6 additions & 0 deletions .changes/unreleased/Fixes-20240411-185203.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Fixes
body: Fix adapter-specific cast handling for constraint enforcement
time: 2024-04-11T18:52:03.960202-07:00
custom:
Author: michelleark
Issue: "166"
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,19 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html),
and is generated by [Changie](https://github.com/miniscruff/changie).

## dbt-adapter 1.1.0-rc1 - April 17, 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

### Under the Hood

* Add the option to set the log level of the AdapterRegistered event
* Update dependabot config to cover GHA

## dbt-adapter 1.0.0 - April 01, 2024

### Fixes
Expand Down
2 changes: 1 addition & 1 deletion dbt/adapters/__about__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version = "1.0.0"
version = "1.1.0rc1"
2 changes: 1 addition & 1 deletion dbt/include/global_project/macros/adapters/columns.sql
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
{%- do col_naked_numeric.append(col['name']) -%}
{%- endif -%}
{% set col_name = adapter.quote(col['name']) if col.get('quote') else col['name'] %}
cast(null as {{ col['data_type'] }}) as {{ col_name }}{{ ", " if not loop.last }}
{{ cast('null', col['data_type']) }} as {{ col_name }}{{ ", " if not loop.last }}
{%- endfor -%}
{%- if (col_err | length) > 0 -%}
{{ exceptions.column_type_missing(column_names=col_err) }}
Expand Down

0 comments on commit 64124d9

Please sign in to comment.