Skip to content

Commit

Permalink
[Bug] stop sending report when no-such-table (#894)
Browse files Browse the repository at this point in the history
* stop sending report when no-such-table

Signed-off-by: Ching Yi, Chan <[email protected]>

* Only ignore table-not-found

Signed-off-by: Ching Yi, Chan <[email protected]>

---------

Signed-off-by: Ching Yi, Chan <[email protected]>
  • Loading branch information
qrtt1 authored Oct 5, 2023
1 parent 893b28a commit 6e36aa6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions 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,10 +164,11 @@ def _fetch_table_task(subject: ProfileSubject):
table = None
try:
table = Table(subject.table, MetaData(), autoload_with=engine, schema=schema)
except Exception as e:
except NoSuchTableError:
# ignore the table metadata fetch error
capture_exception(e)
pass
except Exception as e:
capture_exception(e)
return subject, table

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

0 comments on commit 6e36aa6

Please sign in to comment.