Skip to content

Commit

Permalink
Only ignore table-not-found
Browse files Browse the repository at this point in the history
Signed-off-by: Ching Yi, Chan <[email protected]>
  • Loading branch information
qrtt1 committed Oct 5, 2023
1 parent 1599492 commit a4b3cac
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion piperider_cli/profiler/profiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
from sqlalchemy.sql.elements import ColumnClause
from sqlalchemy.sql.expression import CTE, false, true, table as table_clause, column as column_clause
from sqlalchemy.types import Float
from sqlalchemy.exc import NoSuchTableError

from .event import ProfilerEventHandler, DefaultProfilerEventHandler
from ..configuration import Configuration
Expand Down Expand Up @@ -163,9 +164,11 @@ def _fetch_table_task(subject: ProfileSubject):
table = None
try:
table = Table(subject.table, MetaData(), autoload_with=engine, schema=schema)
except Exception:
except NoSuchTableError as e:

Check failure on line 167 in piperider_cli/profiler/profiler.py

View workflow job for this annotation

GitHub Actions / flake8

piperider_cli/profiler/profiler.py#L167

[F841] local variable

Check warning on line 167 in piperider_cli/profiler/profiler.py

View check run for this annotation

Codecov / codecov/patch

piperider_cli/profiler/profiler.py#L167

Added line #L167 was not covered by tests
# ignore the table metadata fetch error
pass
except Exception as e:
capture_exception(e)

Check warning on line 171 in piperider_cli/profiler/profiler.py

View check run for this annotation

Codecov / codecov/patch

piperider_cli/profiler/profiler.py#L170-L171

Added lines #L170 - L171 were not covered by tests
return subject, table

future = _run_in_executor(self.executor, _fetch_table_task, subject)
Expand Down

0 comments on commit a4b3cac

Please sign in to comment.