-
Notifications
You must be signed in to change notification settings - Fork 22
Description
Is there an existing issue for this?
- I have searched the existing issues
Current Behavior
test model:
`{{ config(
materialized='incremental',
schema='rt_ailin'
)
}}
SELECT
11235 as id,
'alex' as first_name,
'morti' as last_name
FROM dual`
data is not inserted into another schema
START incremental model rt_ailin.customers............................... [RUN]
oracle adapter: Oracle error: ORA-00942: table or view does not exist
1 of 1 ERROR creating incremental model rt_ailin.customers...................... [ERROR in 0.33s]
logs:
another_schema.log
The error is due to the fact that the script replaces the current schema, and the schema is not needed because the global temporary table is created in the current schema anyway
dbt-oracle/dbt/include/oracle/macros/adapters.sql
Lines 354 to 355 in 461f58c
{% set tmp_relation = base_relation.incorporate( | |
path={"identifier": tmp_identifier}) -%} |
fix:
{% set tmp_relation = base_relation.incorporate( path={"identifier": tmp_identifier, "schema": None}) -%}
logs after fix
dbt.log
Expected Behavior
START incremental model rt_ailin.customers............................... [RUN]
OK created incremental model rt_ailin.customers.......................... [OK in 0.49s]
Steps To Reproduce
No response
Relevant log output using --debug
flag enabled
No response
Environment
- OS:MacOs
- Python:3.9
- dbt-core: 1.0.7
What Oracle database version are you using dbt with?
12.1.0
Additional Context
No response