Skip to content

Commit 9d8ff05

Browse files
committed
v1.9.4 changes
- Fix #186 - Fix #190 - Upgrade driver to 3.3.0
1 parent 3ccca2f commit 9d8ff05

File tree

8 files changed

+21
-14
lines changed

8 files changed

+21
-14
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.9.3
2+
VERSION=1.9.4
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.9.3"
17+
version = "1.9.4"

dbt/adapters/oracle/column.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@
1515
limitations under the License.
1616
"""
1717
from dataclasses import dataclass
18-
from typing import Dict, ClassVar
19-
18+
from typing import Dict, ClassVar, Optional
2019

2120
from dbt.adapters.base.column import Column
2221
from dbt.adapters.oracle.keyword_catalog import KEYWORDS
@@ -36,6 +35,8 @@ class OracleColumn(Column):
3635
STRING_DATATYPES = {'char', 'nchar', 'varchar', 'varchar2', 'nvarchar2'}
3736
NUMBER_DATATYPES = {'number', 'float'}
3837

38+
char_length_unit: Optional[str] = None
39+
3940
@property
4041
def data_type(self) -> str:
4142
if self.is_string():

dbt/include/oracle/macros/adapters.sql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,8 @@
235235
data_type as "type",
236236
char_length as "character_maximum_length",
237237
numeric_precision as "numeric_precision",
238-
numeric_scale as "numeric_scale"
238+
numeric_scale as "numeric_scale",
239+
char_used as "char_length_unit"
239240
from columns
240241
where upper(table_name) = upper('{{ relation.identifier }}')
241242
{% if relation.schema %}

dbt/include/oracle/macros/catalog.sql

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,13 @@
9898
columns.column_name as "column_name",
9999
ordinal_position as "column_index",
100100
case
101-
when data_type like '%CHAR%'
102-
then data_type || '(' || cast(char_length as varchar(10)) || ')'
101+
when data_type like '%CHAR%' then
102+
CASE
103+
WHEN char_used = 'C' THEN
104+
data_type || '(' || cast(char_length as varchar(10)) || ' CHAR )'
105+
ELSE
106+
data_type || '(' || cast(char_length as varchar(10)) || ')'
107+
END
103108
else data_type
104109
end as "column_type",
105110
all_col_comments.comments as "column_comment",

dbt_adbs_test_project/dbt_project.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ seeds:
2525
seed_with_empty_col:
2626
+column_types:
2727
id: number
28-
first_name: varchar2(16)
29-
last_name: varchar2(16)
28+
first_name: varchar2(16 char)
29+
last_name: varchar2(16 char)
3030
email: varchar2(26)
3131
gender: varchar2(16)
3232
age: number

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.9.3
3+
version = 1.9.4
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 @@ include_package_data = True
3434
install_requires =
3535
dbt-common>=1.1.0,<2.0
3636
dbt-adapters>=1.2.1,<2.0
37-
dbt-core~=1.9,<1.10
37+
dbt-core~=1.10,<1.11
3838
oracledb==3.2.0
3939
test_suite=tests
4040
test_requires =

setup.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@
4242
requirements = [
4343
"dbt-common>=1.1.0,<2.0",
4444
"dbt-adapters>=1.2.1,<2.0",
45-
"dbt-core~=1.9,<1.10",
46-
"oracledb==3.2.0"
45+
"dbt-core~=1.10,<1.11",
46+
"oracledb==3.3.0"
4747
]
4848

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

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

64-
VERSION = '1.9.3'
64+
VERSION = '1.9.4'
6565
setup(
6666
author="Oracle",
6767
python_requires='>=3.9',

0 commit comments

Comments
 (0)