Skip to content

Commit

Permalink
Fix platform instance support on Druid ingestion
Browse files Browse the repository at this point in the history
If the platform instance was specified in a Druid ingestion, it was always
set twice, because it was overrided in the get_identifier, and then added
again down the line.
This may break existing users that already rely on the broken
platform instance implementation, but they could still manually set
it to the old pattern in their dhub file.
  • Loading branch information
Rasnar committed Feb 24, 2025
1 parent d1494c2 commit 201db8e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 2 additions & 0 deletions docs/how/updating-datahub.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ This file documents any backwards-incompatible changes in DataHub and assists pe

- #12671: The `priority` field of the Incident entity is changed from an integer to an enum. This field was previously completely unused in UI and API, so this change should not affect existing deployments.

- #12716: Fix the `platform_instance` being added twice to the URN. If you want to have the previous behavior back, you need to add your platform_instance twice (i.e. `plat.plat`).


### Known Issues

Expand Down
6 changes: 1 addition & 5 deletions metadata-ingestion/src/datahub/ingestion/source/sql/druid.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,7 @@ def get_sql_alchemy_url(self):
"""

def get_identifier(self, schema: str, table: str) -> str:
return (
f"{self.platform_instance}.{table}"
if self.platform_instance
else f"{table}"
)
return f"{table}"

Check warning on line 53 in metadata-ingestion/src/datahub/ingestion/source/sql/druid.py

View check run for this annotation

Codecov / codecov/patch

metadata-ingestion/src/datahub/ingestion/source/sql/druid.py#L53

Added line #L53 was not covered by tests


@platform_name("Druid")
Expand Down

0 comments on commit 201db8e

Please sign in to comment.