OpenMetadata icon indicating copy to clipboard operation
OpenMetadata copied to clipboard

Profiler logs ModuleNotFoundError warning per-table for dialects without a system metrics implementation (e.g. Vertica)

Open jnrimjhim opened this issue 2 months ago • 3 comments

Affected module

Data Quality / Profiler

Describe the bug

When running a Profiler Workflow against a dialect that has no system-metrics implementation (e.g. Vertica), the following is logged for every table processed, even though profiling itself succeeds and is unaffected:

ModuleNotFoundError: No module named 'metadata.profiler.metrics.system.vertica' [2026-09-04 08:47:47] WARNING {metadata.Profiler:system:161} - No implementation found for vertica

To Reproduce

  1. Set up a Profiler Workflow against a data source dialect that has no system-metrics implementation (e.g. Vertica).
  2. Set loggerLevel: DEBUG in the workflow config.
  3. Run the workflow with Python 3.11 on version 1.12.4.
  4. Observe the logs — for every table processed, the following is emitted:
ModuleNotFoundError: No module named 'metadata.profiler.metrics.system.vertica'
WARNING {metadata.Profiler:system:161} - No implementation found for vertica
  1. Note that profiling results and DQ tests complete successfully and are unaffected — only the log noise is the issue.

Expected behavior

The "no implementation found" warning (and the underlying failed import) should be logged once per dialect per run, not once per table.

OS

No response

Python version

No response

OpenMetadata version

2.0.1

OpenMetadata Ingestion package version

No response

Additional context

No response

Pre-submission checklist

  • [x] I searched for duplicate issues.
  • [x] I removed credentials, hostnames, emails, and other sensitive data from logs and config.

jnrimjhim avatar Sep 17 '26 09:09 jnrimjhim

Hi @jnrimjhim, I'd like to pick this up if it isn't already taken.

The cause looks like SystemMetricsRegistry in ingestion/src/metadata/profiler/metrics/system/system.py. get() treats "key not in _registry" as "not discovered yet", and _discover_implementation() logs the warning and returns without recording anything when the import fails, so a failed discovery is never cached. Since SQAProfilerInterface.__init__ calls SystemMetricsRegistry.get() once per table, the import is retried and the warning re-logged for every table. The ModuleNotFoundError line is the logger.debug(traceback.format_exc()) inside import_from_module, which repeats for the same reason.

My plan is to cache the negative result so discovery runs once per dialect per process, which makes both the warning and the traceback appear once. Happy to be assigned.

One question on the expected behaviour: should the message stay at WARNING once it is deduplicated? Most dialects have no system metrics implementation and that is expected for them, so DEBUG may fit better. I'll leave it at WARNING unless you'd prefer otherwise.

tripleaceme avatar Sep 18 '26 01:09 tripleaceme

Hey @tripleaceme, I've assigned the issue to you. Feel free to raise a PR for this.

On your point about making it DEBUG instead of WARNING, I agree with that. It shouldn't be a warning only DEBUG should suffice for that.

mohittilala avatar Sep 25 '26 04:09 mohittilala

Thanks @tripleaceme, for the contribution! The fix is planned to be shipped in 2.1.0 release.

mohittilala avatar Sep 29 '26 15:09 mohittilala