Repository navigation
Conversation
…or Exasol. It is supsected that there are further errors related to this feature which OMD committed
|
Hi there 👋 Thanks for your contribution! The OpenMetadata team will review the PR shortly! Once it has been labeled as Let us know if you need any help! |
| from metadata.utils.service_spec.default import DefaultDatabaseSpec | ||
|
|
||
| ServiceSpec = DefaultDatabaseSpec( | ||
| profiler_class=ExasolProfilerInterface, # pyright: ignore[reportArgumentType] |
There was a problem hiding this comment.
We don't want to otherwise activate profiler yet, as not all the components are ready based on our local testing.
This was mostly to resolve this test from failing test_create_table_with_profiler, and we believe is a result of the work done by another OMD developer in #27912
|
Hi there 👋 Thanks for your contribution! The OpenMetadata team will review the PR shortly! Once it has been labeled as Let us know if you need any help! |
Hi @tutte , @ulixius9 , @akash-jain-10 , @harshach , Could I get some feedback? I believe I've handled the various CI checks related to what I've added. Please let me know if there are failing tests which I should address; it seems like some of the tests run in the CI have periodic flakey failures, but as an external collaborator, I am unable to re-run them in GitHub. |
|
Code Review ✅ Approved 6 resolved / 6 findingsEnables Exasol column-level comment access by upgrading the SQLAlchemy driver and refactoring the profiling interface. Includes comprehensive new integration tests, addressing all previously identified SQL injection, caching, and matching logic issues. ✅ 6 resolved✅ Security: EXASOL_SYSTEM_METRICS_QUERY uses string formatting, not parameterized SQL
✅ Performance: Double @reflection.cache on get_columns may cause stale results
✅ Edge Case: LIKE-based table matching in system metrics may match wrong tables
✅ Bug: NOT LIKE filters broken after removing .format() escaping
✅ Quality: Leftover diagnostic subprocess printing luigi version in setup_class
...and 1 more resolved from earlier reviews OptionsDisplay: compact → Showing less information. Comment with these commands to change:
Was this helpful? React with 👍 / 👎 | Gitar |



Describe your changes:
Fixes #28620
I worked on:
Type of change:
High-level design:
N/A
Tests:
Use cases covered
Unit tests
(added) ingestion/tests/unit/observability/profiler/sqlalchemy/exasol/test_exasol_profiler_interface.py
(added) ingestion/tests/unit/observability/profiler/sqlalchemy/exasol/test_system.py
(changed) ingestion/tests/unit/observability/profiler/test_table_metric_computer.py
Backend integration tests
Ingestion integration tests
(added) ingestion/tests/integration/sources/database/exasol/test_exasol_queries.py
(changed) ingestion/tests/cli_e2e/test_cli_exasol.py
Playwright (UI) tests
Manual testing performed
UI screen recording / screenshots:
Not applicable.
Checklist:
Fixes <issue-number>: <short explanation>Fixes #<issue-number>above.Summary by Gitar
sqlalchemy-exasolto7.1.1to enable column-level comment reflection and addedluigidependency.exasol.jsontest configuration to requireSELECT ANY DICTIONARYprivileges for auditing.ExasolProfilerInterfaceandExasolSystemMetricsComputerto enable DML operation tracking (INSERT, UPDATE, DELETE) via audit logs.ExasolTableMetricComputerto optimize catalog queries and properly handle view metrics.ModuloFnfor the Exasol dialect.tests/integration/sources/database/exasol/.tests/cli_e2e/test_cli_exasol.pyto verify comment extraction and table profiling.This will update automatically on new commits.
Greptile Summary
This PR adds column-level comment ingestion for Exasol by bumping
sqlalchemy_exasolto 7.1.1 (which natively supportsget_table_comment) and removing the now-redundant custom override. It also introduces a complete profiler stack for Exasol: a newExasolProfilerInterface(skipping system metrics for views),ExasolSystemMetricsComputer(tracking INSERT/UPDATE/DELETE viaEXA_STATISTICS.EXA_DBA_AUDIT_SQL), and a refactoredExasolTableMetricComputerthat correctly handles views vs tables.exasol-integration-test-docker-environment,luigi) from the production plugin into a separateexasol-testextras key, and fixes the audit table references by qualifying them with theEXA_STATISTICS.schema prefix.EXA_ALL_OBJECT_SIZESjoin column fromSCHEMA_NAMEtoROOT_NAMEand adds proper.upper()coercion for catalog lookups.Confidence Score: 5/5
Safe to merge; the changes are well-contained, all new code paths are covered by unit and integration tests, and the production plugin dependency list is now correctly trimmed.
The core logic changes (comment ingestion, system metrics, table metric refactor) are correct and thoroughly tested. No existing behaviour is regressed. The only gaps are two missing init.py files (package and test directory), which are convention issues and do not affect runtime correctness under Python 3.3+ namespace packages.
Add init.py to ingestion/src/metadata/profiler/interface/sqlalchemy/exasol/ and ingestion/tests/unit/observability/profiler/sqlalchemy/exasol/ to match the convention followed by every peer directory.
Important Files Changed
Sequence Diagram
%%{init: {'theme': 'neutral'}}%% sequenceDiagram participant SC as ServiceSpec participant EPI as ExasolProfilerInterface participant ESMC as ExasolSystemMetricsComputer participant DB as EXA_STATISTICS.EXA_DBA_AUDIT_SQL participant ETMC as ExasolTableMetricComputer participant SYS as SYS.EXA_ALL_TABLES SC->>EPI: _compute_system_metrics(metrics, runner) alt tableType is View or MaterializedView EPI-->>SC: return [] else Regular table EPI->>ESMC: __init__(session, runner) EPI->>ESMC: get_system_metrics() ESMC->>ESMC: get_inserts() + get_deletes() + get_updates() ESMC->>DB: "REGEXP_LIKE :table_match_pattern WHERE command_name=:operation" DB-->>ESMC: audit rows (start_time, row_count) ESMC-->>EPI: List[SystemProfile] EPI-->>SC: List[SystemProfile] end SC->>ETMC: compute() alt tableType is View or MaterializedView ETMC->>ETMC: "_compute_view_metrics() => super().compute()" else Regular table ETMC->>ETMC: _compute_table_metrics() ETMC->>SYS: SELECT TABLE_ROW_COUNT FROM EXA_ALL_TABLES JOIN EXA_ALL_OBJECT_SIZES SYS-->>ETMC: row count + size ETMC-->>SC: result row end%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%% sequenceDiagram participant SC as ServiceSpec participant EPI as ExasolProfilerInterface participant ESMC as ExasolSystemMetricsComputer participant DB as EXA_STATISTICS.EXA_DBA_AUDIT_SQL participant ETMC as ExasolTableMetricComputer participant SYS as SYS.EXA_ALL_TABLES SC->>EPI: _compute_system_metrics(metrics, runner) alt tableType is View or MaterializedView EPI-->>SC: return [] else Regular table EPI->>ESMC: __init__(session, runner) EPI->>ESMC: get_system_metrics() ESMC->>ESMC: get_inserts() + get_deletes() + get_updates() ESMC->>DB: "REGEXP_LIKE :table_match_pattern WHERE command_name=:operation" DB-->>ESMC: audit rows (start_time, row_count) ESMC-->>EPI: List[SystemProfile] EPI-->>SC: List[SystemProfile] end SC->>ETMC: compute() alt tableType is View or MaterializedView ETMC->>ETMC: "_compute_view_metrics() => super().compute()" else Regular table ETMC->>ETMC: _compute_table_metrics() ETMC->>SYS: SELECT TABLE_ROW_COUNT FROM EXA_ALL_TABLES JOIN EXA_ALL_OBJECT_SIZES SYS-->>ETMC: row count + size ETMC-->>SC: result row endReviews (2): Last reviewed commit: "Move exasol-test to its own defined plug..." | Re-trigger Greptile