Skip to content

Commit 66aebfa

Browse files
authored
Merge pull request #152 from oracle/dev/1.8.1
v1.8.1
2 parents 9ca25a4 + ff93789 commit 66aebfa

File tree

14 files changed

+34
-18
lines changed

14 files changed

+34
-18
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/adapters/oracle/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@
1414
See the License for the specific language governing permissions and
1515
limitations under the License.
1616
"""
17-
version = "1.8.0"
17+
version = "1.8.1"

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/include/oracle/macros/show.sql

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{#
2-
Copyright (c) 2023, Oracle and/or its affiliates.
2+
Copyright (c) 2024, Oracle and/or its affiliates.
33

44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.
@@ -21,3 +21,11 @@
2121
)
2222
fetch first {{ limit }} rows only
2323
{% endmacro %}
24+
25+
26+
{% macro oracle__get_limit_sql(sql, limit) %}
27+
{{ compiled_code }}
28+
{% if limit is not none %}
29+
fetch first {{ limit }} rows only
30+
{%- endif -%}
31+
{% endmacro %}

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

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
dbt-common>=1.1.0,<2.0
22
dbt-adapters>=1.2.1,<2.0
33
dbt-core>=1.8.1,<2.0
4-
oracledb==2.2.1
4+
oracledb==2.3.0

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

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"dbt-common>=1.1.0,<2.0",
4444
"dbt-adapters>=1.2.1,<2.0",
4545
"dbt-core~=1.8,<1.9",
46-
"oracledb==2.2.1"
46+
"oracledb==2.3.0"
4747
]
4848

4949
test_requirements = [
@@ -61,7 +61,7 @@
6161

6262
url = 'https://github.com/oracle/dbt-oracle'
6363

64-
VERSION = '1.8.0'
64+
VERSION = '1.8.1'
6565
setup(
6666
author="Oracle",
6767
python_requires='>=3.8',

0 commit comments

Comments
 (0)