Skip to content

Commit

Permalink
Merge pull request #145 from oracle/dev/v1.7.6
Browse files Browse the repository at this point in the history
v1.7.6
  • Loading branch information
aosingh authored Jun 11, 2024
2 parents 7cd6f7c + 0901926 commit 5eade6e
Show file tree
Hide file tree
Showing 7 changed files with 52 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Configuration variables
VERSION=1.7.5
VERSION=1.7.6
PROJ_DIR?=$(shell pwd)
VENV_DIR?=${PROJ_DIR}/.bldenv
BUILD_DIR=${PROJ_DIR}/build
Expand Down
2 changes: 1 addition & 1 deletion dbt/adapters/oracle/__version__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@
See the License for the specific language governing permissions and
limitations under the License.
"""
version = "1.7.14"
version = "1.7.16"
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@
from {{ temp_relation }})';
END;
{%- else -%}
insert {%- if parallel -%} /*+parallel({{ parallel }})*/ {%- endif -%} into {{ target_relation }} ({{ dest_cols_csv }})
insert {% if parallel %} /*+parallel({{ parallel }})*/ {% endif %} into {{ target_relation }} ({{ dest_cols_csv }})
(
select {{ dest_cols_csv }}
from {{ temp_relation }}
Expand Down
43 changes: 43 additions & 0 deletions dbt_adbs_test_project/models/us_product_delete_insert_append.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{#
Copyright (c) 2024, Oracle and/or its affiliates.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
#}
{{
config(
materialized='incremental',
incremental_strategy='delete+insert',
parallel=4,
partition_config={"clause": "PARTITION BY HASH(PROD_NAME) PARTITIONS 4"},
table_compression_clause='COLUMN STORE COMPRESS FOR QUERY LOW')
}}

SELECT prod_name, channel_desc, calendar_month_desc,
{{ snapshot_hash_arguments(['prod_name', 'channel_desc', 'calendar_month_desc']) }} AS group_id,
TO_CHAR(SUM(amount_sold), '9,999,999,999') SALES$,
RANK() OVER (ORDER BY SUM(amount_sold)) AS default_rank,
RANK() OVER (ORDER BY SUM(amount_sold) DESC NULLS LAST) AS custom_rank
FROM {{ source('sh_database', 'sales') }}, {{ source('sh_database', 'products') }}, {{ source('sh_database', 'customers') }},
{{ source('sh_database', 'times') }}, {{ source('sh_database', 'channels') }}, {{ source('sh_database', 'countries') }}
WHERE sales.prod_id=products.prod_id AND sales.cust_id=customers.cust_id
AND customers.country_id = countries.country_id AND sales.time_id=times.time_id
AND sales.channel_id=channels.channel_id
AND country_iso_code='US'

{% if is_incremental() %}

AND times.calendar_month_desc > (SELECT MAX(calendar_month_desc) FROM {{ this }})

{% endif %}

GROUP BY prod_name, channel_desc, calendar_month_desc
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
dbt-core~=1.7,<1.8
oracledb==2.2.0
oracledb==2.2.1
4 changes: 2 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = dbt-oracle
version = 1.7.5
version = 1.7.6
description = dbt (data build tool) adapter for Oracle Autonomous Database
long_description = file: README.md
long_description_content_type = text/markdown
Expand Down Expand Up @@ -34,7 +34,7 @@ packages = find_namespace:
include_package_data = True
install_requires =
dbt-core~=1.7,<1.8
oracledb==2.2.0
oracledb==2.2.1
test_suite=tests
test_requires =
dbt-tests-adapter~=1.7,<1.8
Expand Down
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
Copyright (c) 2022, Oracle and/or its affiliates.
Copyright (c) 2024, Oracle and/or its affiliates.
Copyright (c) 2020, Vitor Avancini
Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -41,7 +41,7 @@

requirements = [
"dbt-core~=1.7,<1.8",
"oracledb==2.2.0"
"oracledb==2.2.1"
]

test_requirements = [
Expand All @@ -59,7 +59,7 @@

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

VERSION = '1.7.5'
VERSION = '1.7.6'
setup(
author="Oracle",
python_requires='>=3.8',
Expand Down

0 comments on commit 5eade6e

Please sign in to comment.