mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-09-25 17:04:54 +00:00
Fix Trino Dialect Import issue (#13869)
This commit is contained in:
parent
73c126887c
commit
ec6184d2da
@ -32,7 +32,6 @@ from metadata.ingestion.ometa.ometa_api import OpenMetadata
|
||||
from metadata.ingestion.source.connections import get_connection
|
||||
from metadata.mixins.sqalchemy.sqa_mixin import SQAInterfaceMixin
|
||||
from metadata.profiler.processor.runner import QueryRunner
|
||||
from metadata.profiler.processor.sampler.sampler_factory import sampler_factory_
|
||||
from metadata.profiler.processor.sampler.sqlalchemy.sampler import SQASampler
|
||||
from metadata.utils.constants import TEN_MIN
|
||||
from metadata.utils.importer import import_test_case_class
|
||||
@ -119,6 +118,10 @@ class SQATestSuiteInterface(SQAInterfaceMixin, TestSuiteInterface):
|
||||
|
||||
def _create_sampler(self) -> SQASampler:
|
||||
"""Create sampler instance"""
|
||||
from metadata.profiler.processor.sampler.sampler_factory import ( # pylint: disable=import-outside-toplevel
|
||||
sampler_factory_,
|
||||
)
|
||||
|
||||
return sampler_factory_.create(
|
||||
self.service_connection_config.__class__.__name__,
|
||||
client=self.session,
|
||||
|
@ -30,7 +30,6 @@ from metadata.mixins.pandas.pandas_mixin import PandasInterfaceMixin
|
||||
from metadata.profiler.interface.profiler_interface import ProfilerInterface
|
||||
from metadata.profiler.metrics.core import MetricTypes
|
||||
from metadata.profiler.metrics.registry import Metrics
|
||||
from metadata.profiler.processor.sampler.sampler_factory import sampler_factory_
|
||||
from metadata.readers.dataframe.models import DatalakeTableSchemaWrapper
|
||||
from metadata.utils.constants import COMPLEX_COLUMN_SEPARATOR
|
||||
from metadata.utils.datalake.datalake_utils import fetch_col_types, fetch_dataframe
|
||||
@ -103,6 +102,10 @@ class PandasProfilerInterface(ProfilerInterface, PandasInterfaceMixin):
|
||||
|
||||
def _get_sampler(self):
|
||||
"""Get dataframe sampler from config"""
|
||||
from metadata.profiler.processor.sampler.sampler_factory import ( # pylint: disable=import-outside-toplevel
|
||||
sampler_factory_,
|
||||
)
|
||||
|
||||
return sampler_factory_.create(
|
||||
DatalakeConnection.__name__,
|
||||
client=self.client,
|
||||
|
@ -18,7 +18,6 @@ from sqlalchemy import Column, inspect
|
||||
from metadata.profiler.interface.sqlalchemy.profiler_interface import (
|
||||
SQAProfilerInterface,
|
||||
)
|
||||
from metadata.profiler.processor.sampler.sampler_factory import sampler_factory_
|
||||
|
||||
|
||||
class BigQueryProfilerInterface(SQAProfilerInterface):
|
||||
@ -43,6 +42,10 @@ class BigQueryProfilerInterface(SQAProfilerInterface):
|
||||
|
||||
def _get_sampler(self, **kwargs):
|
||||
"""get sampler object"""
|
||||
from metadata.profiler.processor.sampler.sampler_factory import ( # pylint: disable=import-outside-toplevel
|
||||
sampler_factory_,
|
||||
)
|
||||
|
||||
session = kwargs.get("session")
|
||||
table = kwargs["table"]
|
||||
|
||||
|
@ -40,7 +40,6 @@ from metadata.profiler.orm.functions.table_metric_construct import (
|
||||
)
|
||||
from metadata.profiler.orm.registry import Dialects
|
||||
from metadata.profiler.processor.runner import QueryRunner
|
||||
from metadata.profiler.processor.sampler.sampler_factory import sampler_factory_
|
||||
from metadata.utils.custom_thread_pool import CustomThreadPoolExecutor
|
||||
from metadata.utils.logger import profiler_interface_registry_logger
|
||||
|
||||
@ -108,6 +107,10 @@ class SQAProfilerInterface(ProfilerInterface, SQAInterfaceMixin):
|
||||
|
||||
def _get_sampler(self, **kwargs):
|
||||
"""get sampler object"""
|
||||
from metadata.profiler.processor.sampler.sampler_factory import ( # pylint: disable=import-outside-toplevel
|
||||
sampler_factory_,
|
||||
)
|
||||
|
||||
session = kwargs.get("session")
|
||||
table = kwargs["table"]
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user