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:

0 commit comments

Comments
 (0)