-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extract owner and description for looker dashboards (#943)
* Extract system contact & description * Bump version * Update model version * Bump version
- Loading branch information
Showing
8 changed files
with
97 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[tool.poetry] | ||
name = "metaphor-connectors" | ||
version = "0.14.71" | ||
version = "0.14.72" | ||
license = "Apache-2.0" | ||
description = "A collection of Python-based 'connectors' that extract metadata from various sources to ingest into the Metaphor app." | ||
authors = ["Metaphor <[email protected]>"] | ||
|
@@ -42,7 +42,7 @@ llama-index-readers-confluence = { version = "^0.1.4", optional = true } | |
llama-index-readers-notion = { version = "^0.1.6", optional = true } | ||
looker-sdk = { version = "^24.2.0", optional = true } | ||
lxml = { version = "~=5.0.0", optional = true } | ||
metaphor-models = "0.37.2" | ||
metaphor-models = "0.38.0" | ||
more-itertools = { version = "^10.1.0", optional = true } | ||
msal = { version = "^1.28.0", optional = true } | ||
msgraph-beta-sdk = { version = "~1.4.0", optional = true } | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,6 +28,10 @@ | |
"2" | ||
], | ||
"name": "first" | ||
}, | ||
"systemDescription": { | ||
"description": "first dashboard", | ||
"platform": "LOOKER" | ||
} | ||
}, | ||
{ | ||
|
@@ -59,6 +63,18 @@ | |
"2" | ||
], | ||
"name": "old version dashboard" | ||
}, | ||
"systemContacts": { | ||
"contacts": [ | ||
{ | ||
"email": "[email protected]", | ||
"systemContactSource": "LOOKER" | ||
} | ||
] | ||
}, | ||
"systemDescription": { | ||
"description": "foo", | ||
"platform": "LOOKER" | ||
} | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,6 +28,10 @@ | |
"2" | ||
], | ||
"name": "first" | ||
}, | ||
"systemDescription": { | ||
"description": "first dashboard", | ||
"platform": "LOOKER" | ||
} | ||
}, | ||
{ | ||
|
@@ -59,6 +63,18 @@ | |
"2" | ||
], | ||
"name": "old version dashboard" | ||
}, | ||
"systemContacts": { | ||
"contacts": [ | ||
{ | ||
"email": "[email protected]", | ||
"systemContactSource": "LOOKER" | ||
} | ||
] | ||
}, | ||
"systemDescription": { | ||
"description": "foo", | ||
"platform": "LOOKER" | ||
} | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -94,6 +94,7 @@ def create_extractor(config: LookerRunConfig): | |
), | ||
Dashboard( | ||
id="4", | ||
user_id="1", | ||
title="old version dashboard", | ||
description="foo", | ||
preferred_viewer=None, | ||
|
@@ -139,12 +140,16 @@ def create_extractor(config: LookerRunConfig): | |
"4": FolderMetadata(id="4", name="personal descendant", parent_id="3"), | ||
} | ||
|
||
dashboards = create_extractor(config)._fetch_dashboards(models, folders) | ||
users = { | ||
"1": "[email protected]", | ||
} | ||
|
||
dashboards = create_extractor(config)._fetch_dashboards(models, folders, users) | ||
|
||
events = [EventUtil.trim_event(e) for e in dashboards] | ||
assert events == load_json(f"{test_root_dir}/looker/expected.json") | ||
|
||
config.alternative_base_url = "http://dev.test" | ||
dashboards = create_extractor(config)._fetch_dashboards(models, folders) | ||
dashboards = create_extractor(config)._fetch_dashboards(models, folders, users) | ||
events = [EventUtil.trim_event(e) for e in dashboards] | ||
assert events == load_json(f"{test_root_dir}/looker/expected_alternative.json") |