Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] stop sending report when no-such-table #894

Merged
merged 2 commits into from
Oct 5, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@
table = None
try:
table = Table(subject.table, MetaData(), autoload_with=engine, schema=schema)
except Exception as e:
except NoSuchTableError:

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
capture_exception(e)
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
Loading