Skip to content

Commit

Permalink
feat: different error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
willmaclean committed Jul 9, 2024
1 parent 3a9a082 commit 9e6d1bd
Show file tree
Hide file tree
Showing 3 changed files with 288 additions and 1,018 deletions.
5 changes: 4 additions & 1 deletion lea/clients/duckdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,10 @@ def _table_reference_to_view_key(self, table_reference: str) -> tuple[str]:
('schema', 'subschema', 'table')
"""
database, leftover = table_reference.split(".", 1)
try:
database, leftover = table_reference.split(".", 1)
except ValueError:
raise Exception("Specify the full path to the table, e.g. 'schema.table'")
if database == self.path.stem:
schema, leftover = leftover.split(".", 1)
else:
Expand Down
Loading

0 comments on commit 9e6d1bd

Please sign in to comment.