Skip to content

Fix/manage objects in different schema #16

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jun 9, 2022

Conversation

aosingh
Copy link
Member

@aosingh aosingh commented Jun 8, 2022

Added support for custom schema

  1. Following macros changed or fixed in adapter.sql to use custom schema name - oracle__create_schema, oracle__create_view_as, oracle__alter_relation_comment, oracle__alter_column_type, oracle__drop_relation, oracle__truncate_relation, oracle__rename_relation, oracle__make_temp_relation

  2. Changed view materialization strategy which unnecessarily created an intermediate __dbt_tmp view first and renamed it to the target view. Now we directly CREATE or REPLACE view <target_view_name>

  3. Added generate_schema_name.sql as per dbt documentation in test project to determine the name of the schema that a model should be built in.

  4. Changed a couple of models in the test project to use custom schema

  5. Fixes Bug [Bug] ORA-00942 insert data to another schema #14

  6. Fixes Bug Error while passing schema inside the model using {{ config(materialized='table',schema='schema')}} #2

  7. Addresses issues raised in PR Update adapters.sql #15

aosingh added 3 commits June 7, 2022 12:25
1. Following macros changed or fixed in adapter.sql to use custom schema name - oracle__create_schema, oracle__create_view_as, oracle__alter_relation_comment, oracle__alter_column_type, oracle__drop_relation, oracle__truncate_relation, oracle__rename_relation, oracle__make_temp_relation

2. Changed view materialization strategy which unncessarily created an intermediate <model>__dbt_tmp view first and renamed it to the target view. Now we directly CREATE or REPLACE view <target_view_name>

3. Added generate_schema_name.sql as per dbt documentation in test project to determine the name of the schema that a model should be built in.

4. Changed a couple of models in the test project to use custom schema

5. Fixes Bug #14

6. Fixes Bug #2

7. Addresses issues raised in PR #15
…xisting relation then depending on the type we either drop or rename
@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Jun 8, 2022
@aosingh aosingh merged commit a996e1e into release/v1.0.3 Jun 9, 2022
@aosingh aosingh deleted the fix/manage_objects_in_different_schema branch June 9, 2022 06:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant