Skip to content

Commit

Permalink
fix(ingest): drop redshift-legacy and redshift-usage-legacy sources (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
hsheth2 committed Nov 16, 2023
1 parent cd789b8 commit 9d41a8f
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 1,614 deletions.
2 changes: 2 additions & 0 deletions docs/how/updating-datahub.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ This file documents any backwards-incompatible changes in DataHub and assists pe

### Breaking Changes

- #9244: The `redshift-legacy` and `redshift-legacy-usage` sources, which have been deprecated for >6 months, have been removed. The new `redshift` source is a superset of the functionality provided by those legacy sources.

### Potential Downtime

### Deprecations
Expand Down
6 changes: 0 additions & 6 deletions metadata-ingestion/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,8 +366,6 @@
| usage_common
| {"redshift-connector"}
| sqlglot_lib,
"redshift-legacy": sql_common | redshift_common | sqlglot_lib,
"redshift-usage-legacy": sql_common | redshift_common | sqlglot_lib | usage_common,
"s3": {*s3_base, *data_lake_profiling},
"gcs": {*s3_base, *data_lake_profiling},
"sagemaker": aws_common,
Expand Down Expand Up @@ -510,8 +508,6 @@
"presto",
"redash",
"redshift",
"redshift-legacy",
"redshift-usage-legacy",
"s3",
"snowflake",
"tableau",
Expand Down Expand Up @@ -608,8 +604,6 @@
"postgres = datahub.ingestion.source.sql.postgres:PostgresSource",
"redash = datahub.ingestion.source.redash:RedashSource",
"redshift = datahub.ingestion.source.redshift.redshift:RedshiftSource",
"redshift-legacy = datahub.ingestion.source.sql.redshift:RedshiftSource",
"redshift-usage-legacy = datahub.ingestion.source.usage.redshift_usage:RedshiftUsageSource",
"snowflake = datahub.ingestion.source.snowflake.snowflake_v2:SnowflakeV2Source",
"superset = datahub.ingestion.source.superset:SupersetSource",
"tableau = datahub.ingestion.source.tableau:TableauSource",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from datetime import datetime

from datahub.ingestion.source.sql.redshift import redshift_datetime_format
redshift_datetime_format = "%Y-%m-%d %H:%M:%S"


class RedshiftQuery:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,11 @@
import warnings

from datahub.configuration.common import ConfigurationWarning
from datahub.ingestion.api.registry import PluginRegistry
from datahub.ingestion.api.source import Source

source_registry = PluginRegistry[Source]()
source_registry.register_from_entrypoint("datahub.ingestion.source.plugins")

# Deprecations.
source_registry.register_alias(
"redshift-usage",
"redshift-usage-legacy",
lambda: warnings.warn(
"source type redshift-usage is deprecated, use redshift source instead as usage was merged into the main source",
ConfigurationWarning,
stacklevel=3,
),
)
# source_registry.register_alias(<new_name>, <old_name>, <deprecation_message>)

# The MSSQL source has two possible sets of dependencies. We alias
# the second to the first so that we maintain the 1:1 mapping between
Expand Down

0 comments on commit 9d41a8f

Please sign in to comment.