Skip to content

Commit

Permalink
improved error message for unsupported types #7
Browse files Browse the repository at this point in the history
  • Loading branch information
tanyshak committed May 19, 2023
1 parent 4a63228 commit e6abd44
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions dbt/adapters/upsolver/impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,15 +112,18 @@ def require(self, config, key):


def get_options(self, source, options_type):
if options_type == 'connection_options':
options = Connection_options[source.lower()]
elif options_type == 'transformation_options':
options = Transformation_options[source.lower()]
elif options_type == 'target_options':
options = Target_options[source.lower()]
else:
options = Copy_options[source.lower()][options_type]
return options
try:
if options_type == 'connection_options':
options = Connection_options[source.lower()]
elif options_type == 'transformation_options':
options = Transformation_options[source.lower()]
elif options_type == 'target_options':
options = Target_options[source.lower()]
else:
options = Copy_options[source.lower()][options_type]
return options
except Exception:
raise dbt.exceptions.ParsingError(f"Undefined option value: {source}")

def list_relations_without_caching(
self,
Expand Down

0 comments on commit e6abd44

Please sign in to comment.