-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(iql): add iql gen exception (#77)
- Loading branch information
Showing
6 changed files
with
70 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
from typing import Optional | ||
|
||
from dbally.exceptions import DbAllyError | ||
|
||
|
||
class IQLGenerationError(DbAllyError): | ||
""" | ||
Exception for when an error occurs while generating IQL for a view. | ||
""" | ||
|
||
def __init__( | ||
self, | ||
view_name: str, | ||
filters: Optional[str] = None, | ||
aggregation: Optional[str] = None, | ||
) -> None: | ||
""" | ||
Args: | ||
view_name: Name of the view that caused the error. | ||
filters: Filters generated by the view. | ||
aggregation: Aggregation generated by the view. | ||
""" | ||
super().__init__(f"Error while generating IQL for view {view_name}") | ||
self.view_name = view_name | ||
self.filters = filters | ||
self.aggregation = aggregation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters