mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-08-04 15:18:17 +00:00
Fix explore cache name (#12441)
This commit is contained in:
parent
d8e64b4f30
commit
44d9f62bba
@ -222,7 +222,6 @@ class LookerSource(DashboardServiceSource):
|
||||
Depending on the type of the credentials we'll need a different reader
|
||||
"""
|
||||
if not self._reader_class:
|
||||
|
||||
if self.service_connection.gitCredentials and isinstance(
|
||||
self.service_connection.gitCredentials, GitHubCredentials
|
||||
):
|
||||
@ -243,7 +242,6 @@ class LookerSource(DashboardServiceSource):
|
||||
We either get GitHubCredentials or `NoGitHubCredentials`
|
||||
"""
|
||||
if not self._repo_credentials:
|
||||
|
||||
if self.service_connection.gitCredentials and isinstance(
|
||||
self.service_connection.gitCredentials, GitHubCredentials
|
||||
):
|
||||
@ -405,7 +403,6 @@ class LookerSource(DashboardServiceSource):
|
||||
|
||||
project_parser = self.parser.get(explore.project_name)
|
||||
if project_parser:
|
||||
|
||||
view: Optional[LookMlView] = project_parser.find_view(
|
||||
view_name=view_name,
|
||||
path=Includes(get_path_from_link(explore.lookml_link)),
|
||||
@ -435,18 +432,21 @@ class LookerSource(DashboardServiceSource):
|
||||
Add the lineage source -> view -> explore
|
||||
"""
|
||||
try:
|
||||
# This is the name we store in the cache
|
||||
explore_name = build_datamodel_name(explore.model_name, explore.name)
|
||||
explore_model = self._explores_cache.get(explore_name)
|
||||
|
||||
# TODO: column-level lineage parsing the explore columns with the format `view_name.col`
|
||||
# Now the context has the newly created view
|
||||
yield AddLineageRequest(
|
||||
edge=EntitiesEdge(
|
||||
fromEntity=EntityReference(
|
||||
id=self.context.dataModel.id.__root__, type="dashboardDataModel"
|
||||
),
|
||||
toEntity=EntityReference(
|
||||
id=self._explores_cache[explore.name].id.__root__,
|
||||
type="dashboardDataModel",
|
||||
),
|
||||
if explore_model:
|
||||
yield self._get_add_lineage_request(
|
||||
from_entity=self.context.dataModel, to_entity=explore_model
|
||||
)
|
||||
|
||||
else:
|
||||
logger.info(
|
||||
f"Could not find model for explore [{explore.model_name}: {explore.name}] in the cache"
|
||||
" while processing view lineage."
|
||||
)
|
||||
|
||||
if view.sql_table_name:
|
||||
|
Loading…
x
Reference in New Issue
Block a user