-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(ingest/tableau): Allow parsing of database name from fullName #8981
feat(ingest/tableau): Allow parsing of database name from fullName #8981
Conversation
@@ -605,43 +711,16 @@ def get_overridden_info( | |||
): | |||
upstream_db = lineage_overrides.database_override_map[upstream_db] | |||
|
|||
platform_instance = get_platform_instance(original_platform, platform_instance_map) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed this method in favor of this one line statement
|
||
return full_name.replace("[", "").replace("]", "").split(".") | ||
|
||
def make_dataset_urn( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Basically copied from make_table_urn
connection_type: str | ||
|
||
@classmethod | ||
def create( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Meant to replicate logic in get_upstream_tables
. Pulls values out of table
dict, parses schema from full_name
and default_schema_map
(and now parses database
too), and does this schema in table
check for redshift
@@ -537,12 +542,12 @@ def get_fully_qualified_table_name( | |||
platform: str, | |||
upstream_db: str, | |||
schema: str, | |||
full_name: str, | |||
table_name: str, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was never passed full_name...:
table_urn = make_table_urn(
self.config.env,
upstream_db,
table.get(tableau_constant.CONNECTION_TYPE) or "",
schema,
table_name,
self.config.platform_instance_map,
self.config.lineage_overrides,
)
```
5th argument is clearly `table_name`, not `full_name`
@@ -2462,35 +2437,6 @@ def emit_embedded_datasources(self) -> Iterable[MetadataWorkUnit]: | |||
is_embedded_ds=True, | |||
) | |||
|
|||
@lru_cache(maxsize=None) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I lose the lru_cache capabilities, but I don't think that matters... these are such simple and quick operations
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't fully follow the logic here, but seems reasonable
Merging before smoke tests to create release |
I recognize this is a decent refactor, but I didn't want to keep contributing to this scattered urn generation process. This is meant to replicate existing behavior, aside from adding the ability to parse
[database].[schema].[table]
fromfullName
. Also now parses table name from[schema].[table]
, when it used to only parse the schema nameChecklist