Skip to content
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

fix: ignore personal spaces #9

Merged
merged 3 commits into from
May 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 12 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ When running this project, you would get the following console output:

<p align="center">
<a href="https://github.com/voi-oss/dbt-exposures-crawler/blob/main/docs/cli_output.png">
<img
src="https://github.com/voi-oss/dbt-exposures-crawler/blob/main/docs/cli_output.png?raw=true"
<img
src="https://github.com/voi-oss/dbt-exposures-crawler/blob/main/docs/cli_output.png?raw=true"
alt="CLI example"
width="600px"
/>
Expand All @@ -110,8 +110,8 @@ The `manifest.json` that you provided would have 3 new exposures added to it, su

<p align="center">
<a href="https://github.com/voi-oss/dbt-exposures-crawler/blob/main/docs/modified_manifest.png">
<img
src="https://github.com/voi-oss/dbt-exposures-crawler/blob/main/docs/modified_manifest.png?raw=true"
<img
src="https://github.com/voi-oss/dbt-exposures-crawler/blob/main/docs/modified_manifest.png?raw=true"
alt="modified manifest"
width="600px"
/>
Expand All @@ -123,8 +123,8 @@ downstream dependencies of a certain model:

<p align="center">
<a href="https://github.com/voi-oss/dbt-exposures-crawler/blob/main/docs/models.gif">
<img
src="https://github.com/voi-oss/dbt-exposures-crawler/blob/main/docs/models.gif?raw=true"
<img
src="https://github.com/voi-oss/dbt-exposures-crawler/blob/main/docs/models.gif?raw=true"
alt="models in the documentation portal"
width="600px"
/>
Expand All @@ -135,8 +135,8 @@ Or by doing the inverse. Starting from an exposure, find which models are used o

<p align="center">
<a href="https://github.com/voi-oss/dbt-exposures-crawler/blob/main/docs/exposures.gif">
<img
src="https://github.com/voi-oss/dbt-exposures-crawler/blob/main/docs/exposures.gif?raw=true"
<img
src="https://github.com/voi-oss/dbt-exposures-crawler/blob/main/docs/exposures.gif?raw=true"
alt="exposures in the documentation portal"
width="600px"
/>
Expand All @@ -146,11 +146,13 @@ Or by doing the inverse. Starting from an exposure, find which models are used o
This example has been taken from the integration tests available in this project. You can read more in the `Testing`
section below.

## Assumptions and limitations
## Features, assumptions and limitations

* Only custom SQL written on Tableau workbooks using fully qualified names (`DATABASE.SCHEMA.OBJECT`) will be detected;
* For now, only Tableau workbooks (and not published data sources) are supported. Also, only Snowflake SQL is currently
supported.
supported;
* Workbooks that are created under Tableau's [Personal spaces](https://help.tableau.com/current/pro/desktop/en-us/personal_space.htm)
are ignored (since they usually not governed nor production-ready).

## Usage

Expand Down
6 changes: 6 additions & 0 deletions src/exposurescrawler/crawlers/tableau.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@


def _should_ignore_workbook(workbook, projects_to_ignore: Collection[str]) -> bool:
# Personal spaces are usually used as a sandbox for experimental work

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be nice to add a test for this.
We do have some tests in this repo, but I think we can improve.
Let me know if you would like to do it together.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kevinneville I merged this PR. I guess your comment was added after the merge. We can do it together sometime soon. :)

# and we ignore them in this project. In the Tabeau API, they are represented
# by workbooks under projects without a name.
if not workbook.project_name:
return True

return workbook.project_name in projects_to_ignore


Expand Down