Skip to content

Commit

Permalink
Fixing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
treff7es committed Oct 3, 2023
1 parent c52ea07 commit e507f60
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,9 @@ class DatasetSourceConfigMixin(PlatformInstanceConfigMixin, EnvConfigMixin):
"""


LOWER_CASE_URN_CONFIG_KEY = "convert_urns_to_lowercase"


class LowerCaseDatasetUrnConfigMixin(ConfigModel):
convert_urns_to_lowercase2: bool = Field(
convert_urns_to_lowercase: bool = Field(
default=False,
alias=LOWER_CASE_URN_CONFIG_KEY,
description="Whether to convert dataset urns to lowercase.",
)

Expand Down
7 changes: 2 additions & 5 deletions metadata-ingestion/src/datahub/ingestion/api/source.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,7 @@
from pydantic import BaseModel

from datahub.configuration.common import ConfigModel
from datahub.configuration.source_common import (
LOWER_CASE_URN_CONFIG_KEY,
PlatformInstanceConfigMixin,
)
from datahub.configuration.source_common import PlatformInstanceConfigMixin
from datahub.emitter.mcp_builder import mcps_from_mce
from datahub.ingestion.api.closeable import Closeable
from datahub.ingestion.api.common import PipelineContext, RecordEnvelope, WorkUnit
Expand Down Expand Up @@ -200,7 +197,7 @@ def get_workunit_processors(self) -> List[Optional[MetadataWorkUnitProcessor]]:
if (
self.ctx.pipeline_config
and self.ctx.pipeline_config.source.config
and self.ctx.pipeline_config.source.config.get(LOWER_CASE_URN_CONFIG_KEY)
and self.ctx.pipeline_config.source.config.convert_urns_to_lowercase
):
auto_lowercase_dataset_urns = auto_lowercase_urns
return [
Expand Down

0 comments on commit e507f60

Please sign in to comment.