Skip to content

Commit 55830eb

Browse files
committed
v1.8.1
- oracledb python driver upgraded to 2.3.0 - Added support for BLOB column type in dbt model contracts - Fixed method signature for create schema
1 parent 9ca25a4 commit 55830eb

File tree

11 files changed

+23
-15
lines changed

11 files changed

+23
-15
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Configuration variables
2-
VERSION=1.8.0
2+
VERSION=1.8.1
33
PROJ_DIR?=$(shell pwd)
44
VENV_DIR?=${PROJ_DIR}/.bldenv
55
BUILD_DIR=${PROJ_DIR}/build

dbt/include/oracle/macros/adapters.sql

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@
4242
{%- endif -%}
4343
{%- if col['data_type'] | lower == 'clob' -%}
4444
empty_clob() as {{ col['name'] }}{{ ", " if not loop.last }}
45+
{%- elif col['data_type'] | lower == 'blob' -%}
46+
empty_blob() as {{ col['name'] }}{{ ", " if not loop.last }}
4547
{%- else -%}
4648
cast(null as {{ col['data_type'] }}) as {{ col['name'] }}{{ ", " if not loop.last }}
4749
{%- endif -%}
@@ -63,7 +65,7 @@
6365
) model_subq
6466
{%- endmacro %}
6567

66-
{% macro oracle__create_schema(relation, schema_name) -%}
68+
{% macro oracle__create_schema(relation) -%}
6769
{% if relation.database -%}
6870
{{ adapter.verify_database(relation.database) }}
6971
{%- endif -%}

dbt/include/oracle/macros/materializations/snapshot/snapshot.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@
215215
{% endif %}
216216

217217
{% if not adapter.check_schema_exists(model_database, model.schema) %}
218-
{% do create_schema(model_database, model.schema) %}
218+
{% do create_schema(model.schema) %}
219219
{% endif %}
220220

221221
{% set target_relation_exists, target_relation = get_or_create_relation(

dbt_adbs_test_project/dbt_project.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ seeds:
2121
kafka_message:
2222
+column_types:
2323
message: CLOB
24+
blob_message: BLOB
2425
seed_with_empty_col:
2526
+column_types:
2627
id: number
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
select * from {{ ref('kafka_message') }}
1+
select * from {{ ref('kafka_message') }}

dbt_adbs_test_project/models/promotion_costs.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
See the License for the specific language governing permissions and
1414
limitations under the License.
1515
#}
16-
{{ config(materialized='table')}}
16+
{{ config(materialized='table', grants = {'select': ['dbt_test_1']})}}
1717
with all_promo_costs as(
1818
select * from {{ source('sh_database', 'promotions') }}
1919
)

dbt_adbs_test_project/models/schema.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,11 @@ models:
4343
data_type: CLOB
4444
constraints:
4545
- type: not_null
46+
- name: blob_message
47+
description: Kafka message
48+
data_type: BLOB
49+
constraints:
50+
- type: not_null
4651

4752

4853
- name: people

dbt_adbs_test_project/profiles.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ dbt_test:
99
host: "{{ env_var('DBT_ORACLE_HOST') }}"
1010
port: 1522
1111
service: "{{ env_var('DBT_ORACLE_SERVICE') }}"
12-
# database: "{{ env_var('DBT_ORACLE_DATABASE') }}"
12+
database: "{{ env_var('DBT_ORACLE_DATABASE') }}"
1313
schema: "{{ env_var('DBT_ORACLE_SCHEMA') }}"
1414
oml_cloud_service_url: "{{ env_var('DBT_ORACLE_OML_CLOUD_SERVICE_URL')}}"
1515
session_info:
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
message
2-
Jack-Hunter
3-
Jack-Hunter
4-
Jack-HunterJackHunter
5-
Jack-Hunter
1+
message,blob_message
2+
Jack-Hunter,1234
3+
Jack-Hunter,123124
4+
Jack-HunterJackHunter,123123
5+
Jack-Hunter,123143

setup.cfg

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[metadata]
22
name = dbt-oracle
3-
version = 1.8.0
3+
version = 1.8.1
44
description = dbt (data build tool) adapter for Oracle Autonomous Database
55
long_description = file: README.md
66
long_description_content_type = text/markdown
@@ -36,7 +36,7 @@ install_requires =
3636
dbt-common>=1.1.0,<2.0
3737
dbt-adapters>=1.2.1,<2.0
3838
dbt-core~=1.8,<1.9
39-
oracledb==2.2.1
39+
oracledb==2.3.0
4040
test_suite=tests
4141
test_requires =
4242
dbt-tests-adapter~=1.8,<1.9

0 commit comments

Comments
 (0)