Skip to content

Commit

Permalink
feat(ingest): power-bi - add support for on-prem PowerBI Report Server (
Browse files Browse the repository at this point in the history
  • Loading branch information
alcoccoque authored and cccs-tom committed Nov 18, 2022
1 parent 57efa4f commit 4d6776f
Show file tree
Hide file tree
Showing 12 changed files with 1,787 additions and 2 deletions.
3 changes: 2 additions & 1 deletion docs/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@ We use a plugin architecture so that you can install only the dependencies you a
| [trino](./generated/ingestion/sources/trino.md) | `pip install 'acryl-datahub[trino]'` | Trino source |
| [starburst-trino-usage](./generated/ingestion/sources/trino.md) | `pip install 'acryl-datahub[starburst-trino-usage]'` | Starburst Trino usage statistics source |
| [nifi](./generated/ingestion/sources/nifi.md) | `pip install 'acryl-datahub[nifi]'` | Nifi source |
| [powerbi](./generated/ingestion/sources/powerbi.md) | `pip install 'acryl-datahub[powerbi]'` | Microsoft Power BI source |
| [powerbi](./generated/ingestion/sources/powerbi.md#module-powerbi) | `pip install 'acryl-datahub[powerbi]'` | Microsoft Power BI source |
| [powerbi-report-server](./generated/ingestion/sources/powerbi.md#module-powerbi-report-server) | `pip install 'acryl-datahub[powerbi-report-server]'` | Microsoft Power BI Report Server source |

### Sinks

Expand Down
13 changes: 13 additions & 0 deletions metadata-ingestion/docs/sources/powerbi/powerbi-report-server.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
## Configuration Notes
See the
1. [Microsoft Grant user access to a Report Server doc](https://docs.microsoft.com/en-us/sql/reporting-services/security/grant-user-access-to-a-report-server?view=sql-server-ver16)
2. Use your user credentials from previous step in yaml file
## Concept mapping

| Power BI Report Server | Datahub |
| ------------------------- | ------------------- |
| `Paginated Report` | `Dashboard` |
| `Power BI Report` | `Dashboard` |
| `Mobile Report` | `Dashboard` |
| `Linked Report` | `Dashboard` |
| `Dataset, Datasource` | `N/A` |
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
source:
type: powerbi-report-server
config:
# Your Power BI Report Server Windows username
username: username
# Your Power BI Report Server Windows password
password: password
# Your Workstation name
workstation_name: workstation_name
# Your Power BI Report Server host URL, example: localhost:80
host_port: host_port
# Your alias for Power BI Report Server host URL, example: local_powerbi_report_server
server_alias: server_alias
# Workspace's dataset environments, example: (PROD, DEV, QA, STAGE)
env: DEV
# Workspace's dataset environments, example: (PROD, DEV, QA, STAGE)
graphql_url: http://localhost:8080/api/graphql
# Your Power BI Report Server base virtual directory name for reports
report_virtual_directory_name: Reports
# Your Power BI Report Server base virtual directory name for report server
report_server_virtual_directory_name: ReportServer
# Enable/Disable extracting ownership information of Dashboard
extract_ownership: True
# Set ownership type
ownership_type: TECHNICAL_OWNER


sink:
# sink configs
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 @@ -656,6 +656,26 @@
},
"proposedDelta": null
},
{
"auditHeader": null,
"proposedSnapshot": {
"com.linkedin.pegasus2avro.metadata.snapshot.DataPlatformSnapshot": {
"urn": "urn:li:dataPlatform:powerbi-report-server",
"aspects": [
{
"com.linkedin.pegasus2avro.dataplatform.DataPlatformInfo": {
"datasetNameDelimiter": ".",
"name": "powerbi-report-server",
"displayName": "Power BI Report Server",
"type": "OTHERS",
"logoUrl": "/assets/platforms/powerbireportserverlogo.png"
}
}
]
}
},
"proposedDelta": null
},
{
"auditHeader": null,
"proposedSnapshot": {
Expand Down
5 changes: 5 additions & 0 deletions metadata-ingestion/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,8 @@ def get_long_description():
"deltalake",
}

powerbi_report_server = {"requests", "requests_ntlm"}

usage_common = {
"sqlparse",
}
Expand Down Expand Up @@ -324,6 +326,7 @@ def get_long_description():
"starburst-trino-usage": sql_common | usage_common | trino,
"nifi": {"requests", "packaging"},
"powerbi": microsoft_common,
"powerbi-report-server": powerbi_report_server,
"vertica": sql_common | {"sqlalchemy-vertica[vertica-python]==0.0.5"},
"unity-catalog": databricks_cli | {"requests"},
}
Expand Down Expand Up @@ -414,6 +417,7 @@ def get_long_description():
"hive",
"starburst-trino-usage",
"powerbi",
"powerbi-report-server",
"vertica",
"salesforce",
"unity-catalog"
Expand Down Expand Up @@ -534,6 +538,7 @@ def get_long_description():
"starburst-trino-usage = datahub.ingestion.source.usage.starburst_trino_usage:TrinoUsageSource",
"nifi = datahub.ingestion.source.nifi:NifiSource",
"powerbi = datahub.ingestion.source.powerbi:PowerBiDashboardSource",
"powerbi-report-server = datahub.ingestion.source.powerbi_report_server:PowerBiReportServerDashboardSource",
"iceberg = datahub.ingestion.source.iceberg.iceberg:IcebergSource",
"vertica = datahub.ingestion.source.sql.vertica:VerticaSource",
"presto-on-hive = datahub.ingestion.source.sql.presto_on_hive:PrestoOnHiveSource",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
from datahub.ingestion.source.powerbi_report_server.constants import Constant
from datahub.ingestion.source.powerbi_report_server.report_server import (
PowerBiReportServerDashboardSource,
)
from datahub.ingestion.source.powerbi_report_server.report_server_domain import (
CorpUser,
PowerBiReport,
Report,
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
from enum import Enum


class CreatedFrom(Enum):
REPORT = "Report"
DATASET = "Dataset"
VISUALIZATION = "Visualization"
UNKNOWN = "Unknown"


class RelationshipDirection(Enum):
INCOMING = "INCOMING"
OUTGOING = "OUTGOING"


class Constant:
"""
keys used in powerbi plugin
"""

DATASET = "DATASET"
REPORTS = "REPORTS"
REPORT = "REPORT"
REPORT_DATASOURCES = "REPORT_DATASOURCES"
TYPE_REPORT = "Report"
DATASOURCE = "DATASOURCE"
DATASET_DATASOURCES = "DATASET_DATASOURCES"
DatasetId = "DatasetId"
ReportId = "ReportId"
PowerBiReportId = "ReportId"
Dataset_URN = "DatasetURN"
DASHBOARD_ID = "powerbi.linkedin.com/dashboards/{}"
DASHBOARD = "dashboard"
DATASETS = "DATASETS"
DATASET_ID = "powerbi.linkedin.com/datasets/{}"
DATASET_PROPERTIES = "datasetProperties"
SUBSCRIPTION = "SUBSCRIPTION"
SYSTEM = "SYSTEM"
CATALOG_ITEM = "CATALOG_ITEM"
EXCEL_WORKBOOK = "EXCEL_WORKBOOK"
EXTENSIONS = "EXTENSIONS"
FAVORITE_ITEM = "FAVORITE_ITEM"
FOLDERS = "FOLDERS"
KPIS = "KPIS"
LINKED_REPORTS = "LINKED_REPORTS"
LINKED_REPORT = "LINKED_REPORT"
ME = "ME"
MOBILE_REPORTS = "MOBILE_REPORTS"
MOBILE_REPORT = "MOBILE_REPORT"
POWERBI_REPORTS = "POWERBI_REPORTS"
POWERBI_REPORT = "POWERBI_REPORT"
POWERBI_REPORT_DATASOURCES = "POWERBI_REPORT_DATASOURCES"
TYPE_POWERBI_REPORT = "PowerBIReport"
RESOURCE = "RESOURCE"
SESSION = "SESSION"
SYSTEM_POLICIES = "SYSTEM_POLICIES"
DATASET_KEY = "datasetKey"
BROWSERPATH = "browsePaths"
DATAPLATFORM_INSTANCE = "dataPlatformInstance"
STATUS = "status"
VALUE = "value"
ID = "ID"
DASHBOARD_INFO = "dashboardInfo"
DASHBOARD_KEY = "dashboardKey"
CORP_USER = "corpuser"
CORP_USER_INFO = "corpUserInfo"
OWNERSHIP = "ownership"
CORP_USER_KEY = "corpUserKey"


API_ENDPOINTS = {
Constant.CATALOG_ITEM: "{PBIRS_BASE_URL}/CatalogItems({CATALOG_ID})",
Constant.DATASETS: "{PBIRS_BASE_URL}/Datasets",
Constant.DATASET: "{PBIRS_BASE_URL}/Datasets({DATASET_ID})",
Constant.DATASET_DATASOURCES: "{PBIRS_BASE_URL}/Datasets({DATASET_ID})/DataSources",
Constant.DATASOURCE: "{PBIRS_BASE_URL}/DataSources({DATASOURCE_ID})",
Constant.EXCEL_WORKBOOK: "{PBIRS_BASE_URL}/ExcelWorkbooks({EXCEL_WORKBOOK_ID})",
Constant.EXTENSIONS: "{PBIRS_BASE_URL}/Extensions",
Constant.FAVORITE_ITEM: "{PBIRS_BASE_URL}/FavoriteItems({FAVORITE_ITEM_ID})",
Constant.FOLDERS: "{PBIRS_BASE_URL}/Folders({FOLDER_ID})",
Constant.KPIS: "{PBIRS_BASE_URL}/Kpis({KPI_ID})",
Constant.LINKED_REPORTS: "{PBIRS_BASE_URL}/LinkedReports",
Constant.LINKED_REPORT: "{PBIRS_BASE_URL}/LinkedReports({LINKED_REPORT_ID})",
Constant.ME: "{PBIRS_BASE_URLL}/Me",
Constant.MOBILE_REPORTS: "{PBIRS_BASE_URL}/MobileReports",
Constant.MOBILE_REPORT: "{PBIRS_BASE_URL}/MobileReports({MOBILE_REPORT_ID})",
Constant.POWERBI_REPORTS: "{PBIRS_BASE_URL}/PowerBiReports",
Constant.POWERBI_REPORT: "{PBIRS_BASE_URL}/PowerBiReports({POWERBI_REPORT_ID})",
Constant.POWERBI_REPORT_DATASOURCES: "{PBIRS_BASE_URL}/PowerBiReports({ID})/DataSources",
Constant.REPORTS: "{PBIRS_BASE_URL}/Reports",
Constant.REPORT: "{PBIRS_BASE_URL}/Reports({REPORT_ID})",
Constant.REPORT_DATASOURCES: "{PBIRS_BASE_URL}/Reports({ID})/DataSources",
Constant.RESOURCE: "{PBIRS_BASE_URL}/Resources({RESOURCE_GET})",
Constant.SESSION: "{PBIRS_BASE_URL}/Session",
Constant.SUBSCRIPTION: "{PBIRS_BASE_URL}/Subscriptions({SUBSCRIPTION_ID})",
Constant.SYSTEM: "{PBIRS_BASE_URL}/System",
Constant.SYSTEM_POLICIES: "{PBIRS_BASE_URL}/System/Policies",
}
Loading

0 comments on commit 4d6776f

Please sign in to comment.