Skip to content

Commit 5eade6e

Browse files
authored
Merge pull request #145 from oracle/dev/v1.7.6
v1.7.6
2 parents 7cd6f7c + 0901926 commit 5eade6e

File tree

7 files changed

+52
-9
lines changed

7 files changed

+52
-9
lines changed

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Configuration variables
2-
VERSION=1.7.5
2+
VERSION=1.7.6
33
PROJ_DIR?=$(shell pwd)
44
VENV_DIR?=${PROJ_DIR}/.bldenv
55
BUILD_DIR=${PROJ_DIR}/build

dbt/adapters/oracle/__version__.py

+1-1
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.7.14"
17+
version = "1.7.16"

dbt/include/oracle/macros/materializations/incremental/strategies.sql

+1-1
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@
193193
from {{ temp_relation }})';
194194
END;
195195
{%- else -%}
196-
insert {%- if parallel -%} /*+parallel({{ parallel }})*/ {%- endif -%} into {{ target_relation }} ({{ dest_cols_csv }})
196+
insert {% if parallel %} /*+parallel({{ parallel }})*/ {% endif %} into {{ target_relation }} ({{ dest_cols_csv }})
197197
(
198198
select {{ dest_cols_csv }}
199199
from {{ temp_relation }}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
{#
2+
Copyright (c) 2024, Oracle and/or its affiliates.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
https://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
#}
16+
{{
17+
config(
18+
materialized='incremental',
19+
incremental_strategy='delete+insert',
20+
parallel=4,
21+
partition_config={"clause": "PARTITION BY HASH(PROD_NAME) PARTITIONS 4"},
22+
table_compression_clause='COLUMN STORE COMPRESS FOR QUERY LOW')
23+
}}
24+
25+
SELECT prod_name, channel_desc, calendar_month_desc,
26+
{{ snapshot_hash_arguments(['prod_name', 'channel_desc', 'calendar_month_desc']) }} AS group_id,
27+
TO_CHAR(SUM(amount_sold), '9,999,999,999') SALES$,
28+
RANK() OVER (ORDER BY SUM(amount_sold)) AS default_rank,
29+
RANK() OVER (ORDER BY SUM(amount_sold) DESC NULLS LAST) AS custom_rank
30+
FROM {{ source('sh_database', 'sales') }}, {{ source('sh_database', 'products') }}, {{ source('sh_database', 'customers') }},
31+
{{ source('sh_database', 'times') }}, {{ source('sh_database', 'channels') }}, {{ source('sh_database', 'countries') }}
32+
WHERE sales.prod_id=products.prod_id AND sales.cust_id=customers.cust_id
33+
AND customers.country_id = countries.country_id AND sales.time_id=times.time_id
34+
AND sales.channel_id=channels.channel_id
35+
AND country_iso_code='US'
36+
37+
{% if is_incremental() %}
38+
39+
AND times.calendar_month_desc > (SELECT MAX(calendar_month_desc) FROM {{ this }})
40+
41+
{% endif %}
42+
43+
GROUP BY prod_name, channel_desc, calendar_month_desc

requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
dbt-core~=1.7,<1.8
2-
oracledb==2.2.0
2+
oracledb==2.2.1

setup.cfg

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[metadata]
22
name = dbt-oracle
3-
version = 1.7.5
3+
version = 1.7.6
44
description = dbt (data build tool) adapter for Oracle Autonomous Database
55
long_description = file: README.md
66
long_description_content_type = text/markdown
@@ -34,7 +34,7 @@ packages = find_namespace:
3434
include_package_data = True
3535
install_requires =
3636
dbt-core~=1.7,<1.8
37-
oracledb==2.2.0
37+
oracledb==2.2.1
3838
test_suite=tests
3939
test_requires =
4040
dbt-tests-adapter~=1.7,<1.8

setup.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
Copyright (c) 2022, Oracle and/or its affiliates.
2+
Copyright (c) 2024, Oracle and/or its affiliates.
33
Copyright (c) 2020, Vitor Avancini
44
55
Licensed under the Apache License, Version 2.0 (the "License");
@@ -41,7 +41,7 @@
4141

4242
requirements = [
4343
"dbt-core~=1.7,<1.8",
44-
"oracledb==2.2.0"
44+
"oracledb==2.2.1"
4545
]
4646

4747
test_requirements = [
@@ -59,7 +59,7 @@
5959

6060
url = 'https://github.com/oracle/dbt-oracle'
6161

62-
VERSION = '1.7.5'
62+
VERSION = '1.7.6'
6363
setup(
6464
author="Oracle",
6565
python_requires='>=3.8',

0 commit comments

Comments
 (0)