Skip to content

Commit

Permalink
Merge branch 'main' into yi.wang/sc-25950/crawler-filters-aren-t-merg…
Browse files Browse the repository at this point in the history
…ed-properly
  • Loading branch information
alyiwang authored Apr 22, 2024
2 parents 06d2e2c + 42e3595 commit 1024c14
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 4 additions & 1 deletion metaphor/thought_spot/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from metaphor.common.utils import chunks
from metaphor.models.metadata_change_event import (
ChartType,
DashboardPlatform,
DataPlatform,
Hierarchy,
HierarchyInfo,
Expand Down Expand Up @@ -281,7 +282,9 @@ def getColumnTransformation(target_column: Column) -> Optional[str]:

def create_virtual_hierarchy(name: str, path: List[str]) -> Hierarchy:
return Hierarchy(
logical_id=HierarchyLogicalID(path=path),
logical_id=HierarchyLogicalID(
path=[DashboardPlatform.THOUGHT_SPOT.name] + path
),
hierarchy_info=HierarchyInfo(
name=name, type=HierarchyType.THOUGHT_SPOT_VIRTUAL_HIERARCHY
),
Expand Down
5 changes: 5 additions & 0 deletions tests/thought_spot/expected.json
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,7 @@
{
"logicalId": {
"path": [
"THOUGHT_SPOT",
"ANSWER"
]
},
Expand All @@ -366,6 +367,7 @@
{
"logicalId": {
"path": [
"THOUGHT_SPOT",
"LIVEBOARD"
]
},
Expand All @@ -377,6 +379,7 @@
{
"logicalId": {
"path": [
"THOUGHT_SPOT",
"TABLE"
]
},
Expand All @@ -388,6 +391,7 @@
{
"logicalId": {
"path": [
"THOUGHT_SPOT",
"VIEW"
]
},
Expand All @@ -399,6 +403,7 @@
{
"logicalId": {
"path": [
"THOUGHT_SPOT",
"WORKSHEET"
]
},
Expand Down

0 comments on commit 1024c14

Please sign in to comment.