Skip to content
Open
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
18 changes: 18 additions & 0 deletions plugins/MicrosoftPurview/v1/configValidation.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"steps": [
{
"displayName": "Authenticate and list collections",
"dataStream": { "name": "collections" },
"required": true,
"error": "Could not authenticate or read collections. Check the account name, tenant/client ID, secret, and that the app registration has been added as Data Reader on the Purview root collection.",
"success": "Connected to Purview and read collections."
},
{
"displayName": "List data sources",
"dataStream": { "name": "listDataSources" },
"required": false,
"error": "Authenticated but could not list data sources. Add the app registration as Data Source Administrator on the Purview root collection.",
"success": "Data sources accessible."
}
]
}
16 changes: 16 additions & 0 deletions plugins/MicrosoftPurview/v1/custom_types.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[
{
"name": "Purview Collection",
"sourceType": "Purview Collection",
"icon": "folder-tree",
"singular": "Collection",
"plural": "Collections"
},
{
"name": "Purview Data Source",
"sourceType": "Purview Data Source",
"icon": "database",
"singular": "Data Source",
"plural": "Data Sources"
}
]
25 changes: 25 additions & 0 deletions plugins/MicrosoftPurview/v1/dataStreams/accountAssetCount.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"name": "accountAssetCount",
"displayName": "Total Asset Count",
"description": "Total number of assets cataloged across the whole Purview account",
"tags": ["Assets"],
"baseDataSourceName": "httpRequestUnscoped",
"config": {
"httpMethod": "post",
"endpointPath": "datamap/api/search/query",
"getArgs": [
{ "key": "api-version", "value": "2023-09-01" }
],
"postBody": {
"keywords": null,
"limit": 1
},
"postRequestScript": "accountAssetCount.js"
},
"matches": "none",
"metadata": [
{ "name": "label", "displayName": "Label", "role": "label" },
{ "name": "totalAssets", "displayName": "Total Assets", "shape": "number", "role": "value" }
],
"timeframes": false
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"name": "assetCountByEntityType",
"displayName": "Asset Count by Entity Type",
"description": "Count of assets in the selected collection grouped by entity type",
"tags": ["Assets"],
"baseDataSourceName": "httpRequestScopedSingle",
"config": {
"httpMethod": "post",
"endpointPath": "datamap/api/search/query",
"getArgs": [
{ "key": "api-version", "value": "2023-09-01" }
],
"postBody": {
"keywords": null,
"limit": 1,
"filter": {
"collectionId": "{{object.collectionName}}"
},
"facets": [
{
"facet": "entityType",
"count": 50,
"sort": { "count": "desc" }
}
]
},
"pathToData": "@search.facets.entityType",
"postRequestScript": "assetCountByEntityType.js"
},
"matches": { "sourceType": { "type": "oneOf", "values": ["Purview Collection"] } },
"metadata": [
{ "name": "entityType", "displayName": "Entity Type", "role": "label" },
{ "name": "count", "displayName": "Assets", "shape": "number" }
],
"timeframes": false,
"defaultShaping": { "sort": { "by": [["count", "desc"]] } }
}
76 changes: 76 additions & 0 deletions plugins/MicrosoftPurview/v1/dataStreams/assetLineage.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
{
"name": "assetLineage",
"displayName": "Asset Lineage",
"description": "Upstream and downstream lineage for an asset identified by its GUID",
"tags": ["Assets"],
"baseDataSourceName": "httpRequestUnscoped",
"ui": [
{
"type": "text",
"name": "assetGuid",
"label": "Asset GUID",
"placeholder": "Asset GUID from the catalog",
"validation": {
"required": true,
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
},
"help": "The Purview asset's GUID. Copy it from the asset details page in the Purview portal, or from the **Asset GUID** column of the Search Assets stream."
Comment thread
coderabbitai[bot] marked this conversation as resolved.
},
{
"type": "switch",
"name": "direction",
"label": "Direction",
"defaultValue": "BOTH",
"options": [
{ "value": "BOTH", "label": "Both" },
{ "value": "INPUT", "label": "Upstream" },
{ "value": "OUTPUT", "label": "Downstream" }
]
},
{
"type": "number",
"name": "depth",
"label": "Depth",
"defaultValue": 3,
"validation": { "min": 0, "max": 10 },
"help": "Number of hops to traverse in each direction."
Comment thread
coderabbitai[bot] marked this conversation as resolved.
}
],
"config": {
"httpMethod": "get",
"endpointPath": "datamap/api/atlas/v2/lineage/{{assetGuid}}",
"getArgs": [
{ "key": "direction", "value": "{{direction}}" },
{ "key": "depth", "value": "{{depth}}" }
],
"postRequestScript": "assetLineage.js"
},
"manualConfigApply": true,
"matches": "none",
"metadata": [
{ "name": "guid", "displayName": "GUID", "shape": "guid", "visible": false },
{ "name": "name", "displayName": "Name", "role": "label" },
{ "name": "typeName", "displayName": "Entity Type" },
{ "name": "qualifiedName", "displayName": "Qualified Name" },
{
"name": "role",
"displayName": "Role",
"shape": [
"state",
{
"map": {
"success": ["Base"],
"warning": ["Upstream"],
"unknown": ["Downstream"]
}
}
]
},
{ "name": "status", "displayName": "Status" },
{
"name": "classifications",
"displayName": "Classifications"
}
],
"timeframes": false
}
42 changes: 42 additions & 0 deletions plugins/MicrosoftPurview/v1/dataStreams/assetsByCollection.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"name": "assetsByCollection",
"displayName": "Assets in Collection",
"description": "Assets found in the selected Purview collection",
"tags": ["Assets"],
"baseDataSourceName": "httpRequestScopedSingle",
"config": {
"httpMethod": "post",
"endpointPath": "datamap/api/search/query",
"getArgs": [
{ "key": "api-version", "value": "2023-09-01" }
],
"postBody": {
"keywords": null,
"limit": 100,
"filter": {
"collectionId": "{{object.collectionName}}"
},
"orderby": [{ "name": "ASC" }]
},
"postRequestScript": "assetsByCollection.js",
"paging": {
"mode": "token",
"in": { "realm": "payload", "path": "continuationToken" },
"out": { "realm": "body", "path": "continuationToken" }
}
},
"matches": { "sourceType": { "type": "oneOf", "values": ["Purview Collection"] } },
"metadata": [
{ "name": "id", "displayName": "Asset GUID", "shape": "guid", "visible": false },
{ "name": "name", "displayName": "Name", "role": "label" },
{ "name": "qualifiedName", "displayName": "Qualified Name" },
{ "name": "entityType", "displayName": "Entity Type" },
{ "name": "assetType", "displayName": "Asset Type" },
{ "name": "classification", "displayName": "Classifications" },
{ "name": "term", "displayName": "Glossary Terms" },
{ "name": "label", "displayName": "Labels" },
{ "name": "description", "displayName": "Description" },
{ "name": "owner", "displayName": "Owner" }
],
"timeframes": false
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"name": "assetsByEntityTypeGlobal",
"displayName": "Asset Count by Entity Type",
"description": "Count of assets grouped by entity type across the whole account",
"tags": ["Assets"],
"baseDataSourceName": "httpRequestUnscoped",
"config": {
"httpMethod": "post",
"endpointPath": "datamap/api/search/query",
"getArgs": [
{ "key": "api-version", "value": "2023-09-01" }
],
"postBody": {
"keywords": null,
"limit": 1000
},
"postRequestScript": "assetsByEntityTypeGlobal.js",
"paging": {
"mode": "token",
"in": { "realm": "payload", "path": "continuationToken" },
"out": { "realm": "body", "path": "continuationToken" }
}
},
"matches": "none",
"metadata": [
{ "name": "entityType", "displayName": "Entity Type", "role": "label" },
{ "name": "count", "displayName": "Assets", "shape": "number" }
],
"timeframes": false,
"defaultShaping": { "sort": { "by": [["count", "desc"]] } }
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"name": "classificationCoverage",
"displayName": "Classification Coverage",
"description": "Count of assets carrying each classification across the whole account",
"tags": ["Classifications"],
"baseDataSourceName": "httpRequestUnscoped",
"config": {
"httpMethod": "post",
"endpointPath": "datamap/api/search/query",
"getArgs": [
{ "key": "api-version", "value": "2023-09-01" }
],
"postBody": {
"keywords": null,
"limit": 1000
},
"postRequestScript": "classificationCoverage.js",
"paging": {
"mode": "token",
"in": { "realm": "payload", "path": "continuationToken" },
"out": { "realm": "body", "path": "continuationToken" }
}
},
"matches": "none",
"metadata": [
{ "name": "classification", "displayName": "Classification", "role": "label" },
{ "name": "assets", "displayName": "Assets", "shape": "number" },
{
"name": "coverage",
"displayName": "% of Total Assets",
"shape": ["percent", { "asZeroToOne": true, "decimalPlaces": 1 }]
}
],
"timeframes": false,
"defaultShaping": { "sort": { "by": [["assets", "desc"]] } }
}
27 changes: 27 additions & 0 deletions plugins/MicrosoftPurview/v1/dataStreams/classificationTypes.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"name": "classificationTypes",
"displayName": "Classification Types",
"description": "All classification type definitions in the Purview account",
"tags": ["Classifications"],
"baseDataSourceName": "httpRequestUnscoped",
"config": {
"httpMethod": "get",
"endpointPath": "datamap/api/atlas/v2/types/typedefs",
"getArgs": [
{ "key": "type", "value": "CLASSIFICATION" }
],
"postRequestScript": "classificationTypes.js"
Comment thread
coderabbitai[bot] marked this conversation as resolved.
},
"matches": "none",
"metadata": [
{ "name": "name", "displayName": "Classification", "role": "label" },
{ "name": "description", "displayName": "Description" },
{ "name": "category", "displayName": "Category" },
{ "name": "typeVersion", "displayName": "Version" },
{ "name": "superTypes", "displayName": "Super Types" },
{ "name": "createdBy", "displayName": "Created By" },
{ "name": "createTime", "displayName": "Created", "shape": "date" },
{ "name": "guid", "displayName": "GUID", "shape": "guid", "visible": false }
],
"timeframes": false
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"name": "collectionClassificationSummary",
"displayName": "Classification Summary",
"description": "Classified vs unclassified asset counts for the selected collection",
"tags": ["Classifications"],
"baseDataSourceName": "httpRequestScopedSingle",
"config": {
"httpMethod": "post",
"endpointPath": "datamap/api/search/query",
"getArgs": [
{ "key": "api-version", "value": "2023-09-01" }
],
"postBody": {
"keywords": null,
"limit": 1000,
"filter": {
"collectionId": "{{object.collectionName}}"
}
},
"paging": {
"mode": "token",
"in": { "realm": "payload", "path": "continuationToken" },
"out": { "realm": "body", "path": "continuationToken" }
},
"postRequestScript": "collectionClassificationSummary.js"
},
"matches": { "sourceType": { "type": "oneOf", "values": ["Purview Collection"] } },
"metadata": [
{ "name": "state", "displayName": "State", "shape": ["state", { "map": { "success": ["Classified"], "warning": ["Unclassified"] } }] },
{ "name": "label", "displayName": "Category", "role": "label" },
{ "name": "assets", "displayName": "Assets", "shape": "number", "role": "value" }
],
"timeframes": false
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"name": "collectionClassifiedAssets",
"displayName": "Classified Assets",
"description": "Assets with classifications in the selected collection, one row per asset-classification pair",
"tags": ["Classifications"],
"baseDataSourceName": "httpRequestScopedSingle",
"config": {
"httpMethod": "post",
"endpointPath": "datamap/api/search/query",
"getArgs": [
{ "key": "api-version", "value": "2023-09-01" }
],
"postBody": {
"keywords": null,
"limit": 1000,
"filter": {
"collectionId": "{{object.collectionName}}"
}
},
"paging": {
"mode": "token",
"in": { "realm": "payload", "path": "continuationToken" },
"out": { "realm": "body", "path": "continuationToken" }
},
"postRequestScript": "collectionClassifiedAssets.js"
},
"matches": { "sourceType": { "type": "oneOf", "values": ["Purview Collection"] } },
"metadata": [
{ "name": "assetName", "displayName": "Asset", "role": "label" },
{ "name": "entityType", "displayName": "Entity Type" },
{ "name": "collectionId", "displayName": "Collection", "visible": false },
{ "name": "classification", "displayName": "Classification" }
],
"timeframes": false
}
Loading
Loading