Skip to content

Commit

Permalink
address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
sid-acryl committed Aug 6, 2024
1 parent 2ee3816 commit 0d0866c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 54 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,11 @@
ChartTypeClass,
ContainerClass,
DashboardInfoClass,
DataPlatformInfoClass,
InputFieldClass,
InputFieldsClass,
OwnerClass,
OwnershipClass,
OwnershipTypeClass,
PlatformTypeClass,
SubTypesClass,
)
from datahub.utilities.backpressure_aware_executor import BackpressureAwareExecutor
Expand Down Expand Up @@ -1573,13 +1571,6 @@ def get_workunits_internal(self) -> Iterable[MetadataWorkUnit]:

looker_dashboards_for_usage: List[looker_usage.LookerDashboardForUsage] = []

# Emit platform instance entity
if self.source_config.platform_instance:
platform_instance_urn = builder.make_dataplatform_instance_urn(
platform=self.source_config.platform_name,
instance=self.source_config.platform_instance,
)

with self.reporter.report_stage("dashboard_chart_metadata"):
for job in BackpressureAwareExecutor.map(
self.process_dashboard,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@
create_template,
)
from datahub.ingestion.source.looker.lookml_config import DERIVED_VIEW_PATTERN
from datahub.ingestion.source.looker.str_functions import (
remove_extra_spaces_and_newlines,
)

logger = logging.getLogger(__name__)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
import re
from typing import Any, Dict, List, Optional

import sqlglot

from datahub.ingestion.source.looker.looker_common import (
ViewFieldValue,
find_view_from_resolved_includes,
Expand All @@ -13,13 +11,14 @@
from datahub.ingestion.source.looker.looker_dataclasses import LookerViewFile
from datahub.ingestion.source.looker.looker_file_loader import LookerViewFileLoader
from datahub.ingestion.source.looker.lookml_config import (
DERIVED_VIEW_PATTERN,
DERIVED_VIEW_SUFFIX,
NAME,
LookMLSourceReport,
)
from datahub.ingestion.source.looker.lookml_refinement import LookerRefinementResolver
from datahub.ingestion.source.looker.str_functions import remove_extra_spaces_and_newlines
from datahub.ingestion.source.looker.str_functions import (
remove_extra_spaces_and_newlines,
)

logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -462,7 +461,7 @@ def is_direct_sql_query_case(self) -> bool:
# Applying a simple logic to check if sql_table_name contains a sql.
# if sql_table_name contains sql then its value starts with "(" and checking if "select" is present in side the
# text
if self.sql_table_name().strip().startswith("(") and "select" in self.sql_table_name():
return True

return False
return (
self.sql_table_name().strip().startswith("(")
and "select" in self.sql_table_name()
)
Original file line number Diff line number Diff line change
@@ -1,22 +1,4 @@
[
{
"entityType": "dataPlatformInstance",
"entityUrn": "urn:li:dataPlatformInstance:(urn:li:dataPlatform:looker,ap-south-1)",
"changeType": "UPSERT",
"aspectName": "dataPlatformInfo",
"aspect": {
"json": {
"name": "ap-south-1",
"type": "OTHERS",
"datasetNameDelimiter": "."
}
},
"systemMetadata": {
"lastObserved": 1586847600000,
"runId": "looker-test",
"lastRunId": "no-run-id-provided"
}
},
{
"entityType": "container",
"entityUrn": "urn:li:container:e7fe6fc9c3ca70e78694dcc5dd9c05b7",
Expand Down Expand Up @@ -805,22 +787,6 @@
"lastRunId": "no-run-id-provided"
}
},
{
"entityType": "dataPlatformInstance",
"entityUrn": "urn:li:dataPlatformInstance:(urn:li:dataPlatform:looker,ap-south-1)",
"changeType": "UPSERT",
"aspectName": "status",
"aspect": {
"json": {
"removed": false
}
},
"systemMetadata": {
"lastObserved": 1586847600000,
"runId": "looker-test",
"lastRunId": "no-run-id-provided"
}
},
{
"entityType": "tag",
"entityUrn": "urn:li:tag:Dimension",
Expand Down

0 comments on commit 0d0866c

Please sign in to comment.