You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using column.data_type for columns of type varchar or numeric, the adapters just gives back the column_type, without the size / data_lengths. You can see this behaviour for example when using dbt_utils.union:
Thsi results in ORA-00906: missing left paranthesis
Expected Behavior
Return the data_lengths/size in parathesis:
This can be done by overiting the following methods:
` @DataClass
class OracleColumn(Column):
def is_string(self):
# in Oracle, 'varchar2' is also a string:
if self.dtype.lower() in ['varchar2', 'char', 'varchar']:
return True
return super().is_string()
@classmethod
def string_type(cls, size: int) -> str:
return "varchar2({})".format(size)
def is_numeric(self) -> bool:
# in Oracle, 'number' is also a numeric:
if self.dtype.lower() in ['number', 'float']:
return True
return super().is_numeric()
`
Steps To Reproduce
No response
Relevant log output using --debug flag enabled
No response
Environment
- OS: Windows
- Python: Python 3.8.10
- dbt: 1.1.1
What Oracle database version are you using dbt with?
19c
Additional Context
No response
The text was updated successfully, but these errors were encountered:
1. Fixes Bug #29
2. Introduced new class OracleColumn which can be used to define logic specific to Oracle table column
3. Added an example model in dbt_adbs_test_project to reproduce the error and validate the fix
4. Added a project specific macro in dbt_adbs_test_project to translate the string datatype
This is fixed now and we plan to release the fix in the upcoming dbt-oracle version 1.1.1. Meanwhile, you can test the fix using the release candidate. It can be installed using pip
Is there an existing issue for this?
Current Behavior
When using column.data_type for columns of type varchar or numeric, the adapters just gives back the column_type, without the size / data_lengths. You can see this behaviour for example when using dbt_utils.union:
Thsi results in ORA-00906: missing left paranthesis
Expected Behavior
Return the data_lengths/size in parathesis:
This can be done by overiting the following methods:
`
@DataClass
class OracleColumn(Column):
`
Steps To Reproduce
No response
Relevant log output using
--debug
flag enabledNo response
Environment
What Oracle database version are you using dbt with?
19c
Additional Context
No response
The text was updated successfully, but these errors were encountered: