mirror of
https://github.com/open-metadata/OpenMetadata
synced 2026-05-24 09:39:11 +00:00
* refactor(sampler): collapse SamplerInterface to a single config object Replace the 9-parameter constructor/create() signature with a typed SamplerConfig hierarchy (SamplerConfig / DatabaseSamplerConfig / StorageSamplerConfig). Config resolution — partition_details, sample_query, include/exclude columns, sample_config, sample_data_count — now happens in callers (entity_adapters, profiler_source, base_test_suite_source) before construction, so the interface only receives already-resolved values. - Add sampler_config.py with SamplerConfig dataclass hierarchy - Remove database-specific imports from SamplerInterface base class - Move SSL connection setup and column include/exclude filtering to database-family subclasses (SQASampler, PandasSampler, NoSQLSampler) - Simplify BigQuery/Postgres/Snowflake samplers to *args/**kwargs init - Remove StorageSampler.create() override; base create() is sufficient - Update profiler_source and base_test_suite_source to build DatabaseSamplerConfig before calling sampler_class.create() Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * docs(sampler): fix build_sampler_kwargs example to use SamplerConfig The non-database adapter example was showing the old flat kwargs pattern (sample_config, sample_data_count) that SamplerInterface now silently ignores via **__. Replace with the correct "config": SamplerConfig(...) pattern that matches the actual ContainerAdapter implementation. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix(sampler): guard BigQuerySampler.tableType access with isinstance check ClassifiableEntityType includes Container which has no tableType. The *args/**kwargs init simplified the constructor but lost the explicit Table type annotation, triggering a basedpyright error. Guard with isinstance(self.entity, Table) so the type checker knows tableType is only accessed on Table entities. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * Fix tests * Gitar bot feedback --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| add-support-for-another-entity.md | ||