File tree Expand file tree Collapse file tree
sqlmesh/core/engine_adapter Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -441,7 +441,10 @@ def _insert_overwrite_by_condition(
441441 )
442442
443443 def table_exists (self , table_name : TableName ) -> bool :
444- from google .cloud .exceptions import NotFound
444+ try :
445+ from google .cloud .exceptions import NotFound
446+ except ModuleNotFoundError :
447+ from google .api_core .exceptions import NotFound
445448
446449 try :
447450 self ._get_table (table_name )
@@ -649,7 +652,10 @@ def __init__(self, num_retries: int) -> None:
649652
650653 @property
651654 def retryable_errors (self ) -> t .Tuple [t .Type [Exception ], ...]:
652- from google .cloud .exceptions import ServerError
655+ try :
656+ from google .cloud .exceptions import ServerError
657+ except ModuleNotFoundError :
658+ from google .api_core .exceptions import ServerError
653659 from requests .exceptions import ConnectionError
654660
655661 return (ServerError , ConnectionError )
You can’t perform that action at this time.
0 commit comments