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

feat: powerbi source plugin #4201

Merged
merged 28 commits into from
Mar 1, 2022
Merged
Show file tree
Hide file tree
Changes from 27 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
e545f5d
powerbi source plugin
siddiquebagwan-gslab Feb 3, 2022
834d466
Merge branch 'master' into power-bi-plugin
siddiquebagwan-gslab Feb 3, 2022
0000c9e
powerbi integration test
siddiquebagwan-gslab Feb 3, 2022
6f6feaf
fixes linter issues
siddiquebagwan-gslab Feb 3, 2022
dd93e26
Added users in dashboard and custom properties in dashboard and chart
siddiquebagwan-gslab Feb 8, 2022
9a21e12
powerbi plugin WIP
siddiquebagwan-gslab Feb 15, 2022
d877535
merge master
siddiquebagwan-gslab Feb 15, 2022
c761929
powerbi plugin v0.1 integration test
siddiquebagwan-gslab Feb 16, 2022
e6c168e
Fix the lint issue
siddiquebagwan-gslab Feb 16, 2022
82a9a19
powerbi plugin WIP
siddiquebagwan-gslab Feb 16, 2022
92ba4b9
Merge branch 'master' into power-bi-plugin
siddiquebagwan-gslab Feb 16, 2022
dc9990e
Fix powerbi integration
siddiquebagwan-gslab Feb 16, 2022
b15a08f
datasetWebUrl as chart custom-properties
siddiquebagwan-gslab Feb 18, 2022
af8808f
WIP:powerbi documentation
siddiquebagwan-gslab Feb 18, 2022
a97e4e6
Merge branch 'master' into power-bi-plugin
siddiquebagwan-gslab Feb 18, 2022
ce73edd
WIP: removed powerbi plugin
siddiquebagwan-gslab Feb 18, 2022
b128739
powerbi source readme
siddiquebagwan-gslab Feb 20, 2022
7753eaa
Added powerbi readme in cli.md
siddiquebagwan-gslab Feb 20, 2022
8657049
Merge branch 'master' into power-bi-plugin
siddiquebagwan-gslab Feb 20, 2022
1ebe362
Fix the powerbi.md
siddiquebagwan-gslab Feb 20, 2022
93040d2
feat: powerbi source plugin
siddiquebagwan-gslab Feb 20, 2022
ca402ad
Merge branch 'master' into power-bi-plugin
siddiquebagwan-gslab Feb 23, 2022
1a14828
refactor(powerbi): Resolve PR #4201 review comments
siddiquebagwan-gslab Feb 23, 2022
3d9f9b5
Merge branch 'master' into power-bi-plugin
siddiquebagwan-gslab Feb 23, 2022
cc65e5c
fix lint
shirshanka Feb 25, 2022
6be20ca
Merge branch 'linkedin:master' into power-bi-plugin
siddiquebagwan Feb 25, 2022
ef0831a
adding logo for platform
shirshanka Feb 25, 2022
f653fa5
Merge branch 'master' into power-bi-plugin
shirshanka Feb 25, 2022
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
Binary file added datahub-web-react/src/images/powerbilogo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ We use a plugin architecture so that you can install only the dependencies you a
| [trino](../metadata-ingestion/source_docs/trino.md) | `pip install 'acryl-datahub[trino]` | Trino source |
| [starburst-trino-usage](../metadata-ingestion/source_docs/trino.md) | `pip install 'acryl-datahub[starburst-trino-usage]'` | Starburst Trino usage statistics source |
| [nifi](../metadata-ingestion/source_docs/nifi.md) | `pip install 'acryl-datahub[nifi]` | Nifi source |
| [powerbi](../metadata-ingestion/source_docs/powerbi.md) | `pip install 'acryl-datahub[powerbi]` | Microsoft Power BI source |

### Sinks

Expand Down
20 changes: 20 additions & 0 deletions metadata-ingestion/examples/mce_files/data_platforms.json
Original file line number Diff line number Diff line change
Expand Up @@ -595,5 +595,25 @@
}
},
"proposedDelta": null
},
{
"auditHeader": null,
"proposedSnapshot": {
"com.linkedin.pegasus2avro.metadata.snapshot.DataPlatformSnapshot": {
"urn": "urn:li:dataPlatform:powerbi",
"aspects": [
{
"com.linkedin.pegasus2avro.dataplatform.DataPlatformInfo": {
"datasetNameDelimiter": ".",
"name": "powerbi",
"displayName": "Power BI",
"type": "OTHERS",
"logoUrl": "/assets/platforms/powerbilogo.png"
}
}
]
}
},
"proposedDelta": null
}
]
6 changes: 6 additions & 0 deletions metadata-ingestion/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ def get_long_description():
"cryptography",
}

microsoft_common = {
"msal==1.16.0"
}
# Note: for all of these, framework_common will be added.
plugins: Dict[str, Set[str]] = {
# Sink plugins.
Expand Down Expand Up @@ -166,6 +169,7 @@ def get_long_description():
"trino": sql_common | {"trino"},
"starburst-trino-usage": sql_common | {"trino"},
"nifi": {"requests", "packaging"},
"powerbi": {"orderedset"} | microsoft_common
}

all_exclude_plugins: Set[str] = {
Expand Down Expand Up @@ -242,6 +246,7 @@ def get_long_description():
"trino",
"hive",
"starburst-trino-usage",
"powerbi"
# airflow is added below
]
for dependency in plugins[plugin]
Expand Down Expand Up @@ -339,6 +344,7 @@ def get_long_description():
"trino = datahub.ingestion.source.sql.trino:TrinoSource",
"starburst-trino-usage = datahub.ingestion.source.usage.starburst_trino_usage:TrinoUsageSource",
"nifi = datahub.ingestion.source.nifi:NifiSource",
"powerbi = datahub.ingestion.source.powerbi:PowerBiDashboardSource",
],
"datahub.ingestion.sink.plugins": [
"file = datahub.ingestion.sink.file:FileSink",
Expand Down
88 changes: 88 additions & 0 deletions metadata-ingestion/source_docs/powerbi.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
# Power BI dashboards

For context on getting started with ingestion, check out our [metadata ingestion guide](../README.md).

## Setup

To install this plugin, run `pip install 'acryl-datahub[powerbi]'`.

## Capabilities

This plugin extracts the following:

- Power BI dashboards, tiles, datasets
- Names, descriptions and URLs of dashboard and tile
- Owners of dashboards

## Configuration Notes

See the
1. [Microsoft AD App Creation doc](https://docs.microsoft.com/en-us/power-bi/developer/embedded/embed-service-principal) for the steps to create a app client ID and secret.
2. Login to Power BI as Admin and from `Tenant settings` allow below permissions.
- Allow service principles to use Power BI APIs
- Allow service principals to use read-only Power BI admin APIs
- Enhance admin APIs responses with detailed metadata


## Quickstart recipe

Check out the following recipe to get started with ingestion! See [below](#config-details) for full configuration options.

For general pointers on writing and running a recipe, see our [main recipe guide](../README.md#recipes).

```yml
source:
type: "powerbi"
config:
# Your Power BI tenant identifier
tenant_id: a949d688-67c0-4bf1-a344-e939411c6c0a
# Ingest elements of below PowerBi Workspace into Datahub
workspace_id: 4bd10256-e999-45dd-8e56-571c77153a5f
# Workspace's dataset environments (PROD, DEV, QA, STAGE)
env: DEV
# Azure AD App client identifier
client_id: foo
# Azure AD App client secret
client_secret: bar
# dataset_type_mapping is fixed mapping of Power BI datasources type to equivalent Datahub "data platform" dataset
dataset_type_mapping:
PostgreSql: postgres
Oracle: oracle


sink:
# sink configs
```

## Config details

| Field | Required | Default | Description |
| ------------------------- | -------- | ----------------------- | ------------------------------------------------------------------------------------------------------------ |
| `tenant_id` | ✅ | | Power BI tenant identifier. |
| `workspace_id` | ✅ | | Power BI workspace identifier. |
| `env` | ✅ | | Environment to use in namespace when constructing URNs. |
| `client_id` | ✅ | | Azure AD App client identifier. |
| `client_secret` | ✅ | | Azure AD App client secret.
| `dataset_type_mapping` | ✅ | | Mapping of Power BI datasource type to Datahub dataset.
| `scan_timeout` | ✅ | 60 | time in seconds to wait for Power BI metadata scan result.

## Concept mapping
siddiquebagwan marked this conversation as resolved.
Show resolved Hide resolved

| Power BI | Datahub |
| ------------------------- | ------------------- |
| `Dashboard` | `Dashboard` |
| `Dataset, Datasource` | `Dataset` |
| `Tile` | `Chart` |
| `Report.webUrl` | `Chart.externalUrl` |
| `Workspace` | `N/A` |
| `Report` | `N/A` |

If Tile is created from report then Chart.externalUrl is set to Report.webUrl.

## Compatibility

Coming soon!

## Questions

If you've got any questions on configuring this source, feel free to ping us on [our Slack](https://slack.datahubproject.io/)!
Loading