Skip to content

Commit

Permalink
Fix Duplicate option issue (#30)
Browse files Browse the repository at this point in the history
* fix duplicate option

* v1.5.28

---------

Co-authored-by: Tanya Shemet <[email protected]>
  • Loading branch information
navado and tanyshak authored Oct 16, 2023
1 parent 6a1fc5b commit 81ce523
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
2 changes: 1 addition & 1 deletion dbt/adapters/upsolver/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version = "1.5.27"
version = "1.5.28"
15 changes: 13 additions & 2 deletions dbt/adapters/upsolver/impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,6 @@ def enrich_options(self, config_options, source, options_type):
value = self.render_option_from_list_dict(value)
enriched_options[option] = find_value
enriched_options[option]['value'] = value
else:
logger.warning(f"Options not found: {option}")
return enriched_options

@available
Expand Down Expand Up @@ -337,3 +335,16 @@ def is_expectation_exists(self, job_name, expectation_name):
return True
else:
return False

@available
def unique_options(self, options_1, options_2):
if options_1 and options_2:
options_1.update(options_2)
options = options_1
elif options_1:
options = options_1
elif options_2:
options = options_2
else:
options = {}
return options
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@
SYNC {{''}}
{%- endif -%}
JOB {{job_identifier}}
{{ render_options(job_options, 'create') }}
{{ render_options(target_options, 'create') }}
{{ render_options(adapter.unique_options(job_options, target_options), 'create') }}
AS COPY FROM {{source}} {{connection_identifier}}
{{ render_options(source_options, 'create') }}
INTO {{target_type}} {{into_relation}}
Expand Down

0 comments on commit 81ce523

Please sign in to comment.