acryl-datahub 1.2.0.7rc3__py3-none-any.whl → 1.2.0.8__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of acryl-datahub might be problematic. Click here for more details.
- {acryl_datahub-1.2.0.7rc3.dist-info → acryl_datahub-1.2.0.8.dist-info}/METADATA +2673 -2672
- {acryl_datahub-1.2.0.7rc3.dist-info → acryl_datahub-1.2.0.8.dist-info}/RECORD +53 -50
- datahub/_version.py +1 -1
- datahub/cli/delete_cli.py +1 -0
- datahub/ingestion/api/report.py +18 -0
- datahub/ingestion/api/sink.py +0 -3
- datahub/ingestion/api/source.py +4 -4
- datahub/ingestion/autogenerated/capability_summary.json +2 -2
- datahub/ingestion/graph/client.py +8 -1
- datahub/ingestion/run/pipeline.py +19 -4
- datahub/ingestion/sink/datahub_rest.py +0 -12
- datahub/ingestion/source/bigquery_v2/bigquery_connection.py +12 -1
- datahub/ingestion/source/cassandra/cassandra_api.py +17 -1
- datahub/ingestion/source/cassandra/cassandra_config.py +5 -0
- datahub/ingestion/source/datahub/config.py +4 -0
- datahub/ingestion/source/datahub/datahub_database_reader.py +6 -1
- datahub/ingestion/source/fivetran/config.py +1 -1
- datahub/ingestion/source/iceberg/iceberg.py +76 -34
- datahub/ingestion/source/metadata/lineage.py +8 -8
- datahub/ingestion/source/qlik_sense/qlik_sense.py +1 -1
- datahub/ingestion/source/redshift/redshift.py +1 -1
- datahub/ingestion/source/sql/athena.py +95 -18
- datahub/ingestion/source/sql/athena_properties_extractor.py +43 -25
- datahub/ingestion/source/superset.py +3 -2
- datahub/ingestion/source/tableau/tableau.py +8 -5
- datahub/ingestion/source/unity/config.py +65 -11
- datahub/ingestion/source/unity/proxy.py +90 -5
- datahub/ingestion/source/unity/proxy_patch.py +321 -0
- datahub/ingestion/source/unity/source.py +12 -0
- datahub/ingestion/source/usage/usage_common.py +1 -0
- datahub/metadata/_internal_schema_classes.py +207 -12
- datahub/metadata/_urns/urn_defs.py +4 -0
- datahub/metadata/com/linkedin/pegasus2avro/settings/asset/__init__.py +19 -0
- datahub/metadata/com/linkedin/pegasus2avro/template/__init__.py +6 -0
- datahub/metadata/schema.avsc +160 -12
- datahub/metadata/schemas/AssetSettings.avsc +63 -0
- datahub/metadata/schemas/DataHubPageModuleProperties.avsc +9 -1
- datahub/metadata/schemas/DataHubPageTemplateProperties.avsc +77 -1
- datahub/metadata/schemas/DataProductKey.avsc +2 -1
- datahub/metadata/schemas/DomainKey.avsc +2 -1
- datahub/metadata/schemas/GlossaryNodeKey.avsc +2 -1
- datahub/metadata/schemas/GlossaryTermKey.avsc +2 -1
- datahub/metadata/schemas/IncidentInfo.avsc +3 -3
- datahub/metadata/schemas/StructuredPropertyDefinition.avsc +0 -3
- datahub/sdk/chart.py +36 -22
- datahub/sdk/dashboard.py +38 -62
- datahub/sql_parsing/sqlglot_lineage.py +121 -28
- datahub/sql_parsing/sqlglot_utils.py +12 -1
- datahub/utilities/urns/urn.py +41 -2
- {acryl_datahub-1.2.0.7rc3.dist-info → acryl_datahub-1.2.0.8.dist-info}/WHEEL +0 -0
- {acryl_datahub-1.2.0.7rc3.dist-info → acryl_datahub-1.2.0.8.dist-info}/entry_points.txt +0 -0
- {acryl_datahub-1.2.0.7rc3.dist-info → acryl_datahub-1.2.0.8.dist-info}/licenses/LICENSE +0 -0
- {acryl_datahub-1.2.0.7rc3.dist-info → acryl_datahub-1.2.0.8.dist-info}/top_level.txt +0 -0
datahub/metadata/schema.avsc
CHANGED
|
@@ -3411,6 +3411,80 @@
|
|
|
3411
3411
|
"name": "rows",
|
|
3412
3412
|
"doc": "The rows of modules contained in this template"
|
|
3413
3413
|
},
|
|
3414
|
+
{
|
|
3415
|
+
"type": [
|
|
3416
|
+
"null",
|
|
3417
|
+
{
|
|
3418
|
+
"type": "record",
|
|
3419
|
+
"name": "DataHubPageTemplateAssetSummary",
|
|
3420
|
+
"namespace": "com.linkedin.pegasus2avro.template",
|
|
3421
|
+
"fields": [
|
|
3422
|
+
{
|
|
3423
|
+
"type": [
|
|
3424
|
+
"null",
|
|
3425
|
+
{
|
|
3426
|
+
"type": "array",
|
|
3427
|
+
"items": {
|
|
3428
|
+
"type": "record",
|
|
3429
|
+
"name": "SummaryElement",
|
|
3430
|
+
"namespace": "com.linkedin.pegasus2avro.template",
|
|
3431
|
+
"fields": [
|
|
3432
|
+
{
|
|
3433
|
+
"type": {
|
|
3434
|
+
"type": "enum",
|
|
3435
|
+
"name": "SummaryElementType",
|
|
3436
|
+
"namespace": "com.linkedin.pegasus2avro.template",
|
|
3437
|
+
"symbols": [
|
|
3438
|
+
"CREATED",
|
|
3439
|
+
"TAGS",
|
|
3440
|
+
"GLOSSARY_TERMS",
|
|
3441
|
+
"OWNERS",
|
|
3442
|
+
"DOMAIN",
|
|
3443
|
+
"STRUCTURED_PROPERTY"
|
|
3444
|
+
]
|
|
3445
|
+
},
|
|
3446
|
+
"name": "elementType",
|
|
3447
|
+
"doc": "The type of element/property"
|
|
3448
|
+
},
|
|
3449
|
+
{
|
|
3450
|
+
"Relationship": {
|
|
3451
|
+
"entityTypes": [
|
|
3452
|
+
"structuredProperty"
|
|
3453
|
+
],
|
|
3454
|
+
"name": "ContainsStructuredProperty"
|
|
3455
|
+
},
|
|
3456
|
+
"java": {
|
|
3457
|
+
"class": "com.linkedin.pegasus2avro.common.urn.Urn"
|
|
3458
|
+
},
|
|
3459
|
+
"Urn": "Urn",
|
|
3460
|
+
"entityTypes": [
|
|
3461
|
+
"structuredProperty"
|
|
3462
|
+
],
|
|
3463
|
+
"type": [
|
|
3464
|
+
"null",
|
|
3465
|
+
"string"
|
|
3466
|
+
],
|
|
3467
|
+
"name": "structuredPropertyUrn",
|
|
3468
|
+
"default": null,
|
|
3469
|
+
"doc": "The urn of the structured property shown. Required if propertyType is STRUCTURED_PROPERTY"
|
|
3470
|
+
}
|
|
3471
|
+
],
|
|
3472
|
+
"doc": "Info for a given asset summary element"
|
|
3473
|
+
}
|
|
3474
|
+
}
|
|
3475
|
+
],
|
|
3476
|
+
"name": "summaryElements",
|
|
3477
|
+
"default": null,
|
|
3478
|
+
"doc": "The optional list of properties shown on an asset summary page header."
|
|
3479
|
+
}
|
|
3480
|
+
],
|
|
3481
|
+
"doc": "The page template info for asset summaries"
|
|
3482
|
+
}
|
|
3483
|
+
],
|
|
3484
|
+
"name": "assetSummary",
|
|
3485
|
+
"default": null,
|
|
3486
|
+
"doc": "The optional info for asset summaries. Should be populated if surfaceType is ASSET_SUMMARY"
|
|
3487
|
+
},
|
|
3414
3488
|
{
|
|
3415
3489
|
"type": {
|
|
3416
3490
|
"type": "record",
|
|
@@ -3424,12 +3498,14 @@
|
|
|
3424
3498
|
"type": {
|
|
3425
3499
|
"type": "enum",
|
|
3426
3500
|
"symbolDocs": {
|
|
3501
|
+
"ASSET_SUMMARY": "This template applies to what to display on asset summary pages",
|
|
3427
3502
|
"HOME_PAGE": "This template applies to what to display on the home page for users."
|
|
3428
3503
|
},
|
|
3429
3504
|
"name": "PageTemplateSurfaceType",
|
|
3430
3505
|
"namespace": "com.linkedin.pegasus2avro.template",
|
|
3431
3506
|
"symbols": [
|
|
3432
|
-
"HOME_PAGE"
|
|
3507
|
+
"HOME_PAGE",
|
|
3508
|
+
"ASSET_SUMMARY"
|
|
3433
3509
|
]
|
|
3434
3510
|
},
|
|
3435
3511
|
"name": "surfaceType",
|
|
@@ -4646,7 +4722,8 @@
|
|
|
4646
4722
|
"forms",
|
|
4647
4723
|
"testResults",
|
|
4648
4724
|
"subTypes",
|
|
4649
|
-
"displayProperties"
|
|
4725
|
+
"displayProperties",
|
|
4726
|
+
"assetSettings"
|
|
4650
4727
|
]
|
|
4651
4728
|
},
|
|
4652
4729
|
"name": "GlossaryNodeKey",
|
|
@@ -5042,7 +5119,8 @@
|
|
|
5042
5119
|
"structuredProperties",
|
|
5043
5120
|
"forms",
|
|
5044
5121
|
"testResults",
|
|
5045
|
-
"displayProperties"
|
|
5122
|
+
"displayProperties",
|
|
5123
|
+
"assetSettings"
|
|
5046
5124
|
],
|
|
5047
5125
|
"entityDoc": "A data domain within an organization."
|
|
5048
5126
|
},
|
|
@@ -5077,7 +5155,8 @@
|
|
|
5077
5155
|
"structuredProperties",
|
|
5078
5156
|
"forms",
|
|
5079
5157
|
"testResults",
|
|
5080
|
-
"subTypes"
|
|
5158
|
+
"subTypes",
|
|
5159
|
+
"assetSettings"
|
|
5081
5160
|
]
|
|
5082
5161
|
},
|
|
5083
5162
|
"name": "GlossaryTermKey",
|
|
@@ -10036,11 +10115,11 @@
|
|
|
10036
10115
|
"filterNameOverride": "Priority"
|
|
10037
10116
|
},
|
|
10038
10117
|
"type": [
|
|
10039
|
-
"
|
|
10040
|
-
"
|
|
10118
|
+
"null",
|
|
10119
|
+
"int"
|
|
10041
10120
|
],
|
|
10042
10121
|
"name": "priority",
|
|
10043
|
-
"default":
|
|
10122
|
+
"default": null,
|
|
10044
10123
|
"doc": "A numeric severity or priority for the incident. On the UI we will translate this into something easy to understand.\nCurrently supported: 0 - CRITICAL, 1 - HIGH, 2 - MED, 3 - LOW\n(We probably should have modeled as an enum)"
|
|
10045
10124
|
},
|
|
10046
10125
|
{
|
|
@@ -10702,7 +10781,8 @@
|
|
|
10702
10781
|
"structuredProperties",
|
|
10703
10782
|
"forms",
|
|
10704
10783
|
"testResults",
|
|
10705
|
-
"subTypes"
|
|
10784
|
+
"subTypes",
|
|
10785
|
+
"assetSettings"
|
|
10706
10786
|
]
|
|
10707
10787
|
},
|
|
10708
10788
|
"name": "DataProductKey",
|
|
@@ -11920,6 +12000,69 @@
|
|
|
11920
12000
|
],
|
|
11921
12001
|
"doc": "DataHub Global platform settings. Careful - these should not be modified by the outside world!"
|
|
11922
12002
|
},
|
|
12003
|
+
{
|
|
12004
|
+
"type": "record",
|
|
12005
|
+
"Aspect": {
|
|
12006
|
+
"name": "assetSettings"
|
|
12007
|
+
},
|
|
12008
|
+
"name": "AssetSettings",
|
|
12009
|
+
"namespace": "com.linkedin.pegasus2avro.settings.asset",
|
|
12010
|
+
"fields": [
|
|
12011
|
+
{
|
|
12012
|
+
"type": [
|
|
12013
|
+
"null",
|
|
12014
|
+
{
|
|
12015
|
+
"type": "record",
|
|
12016
|
+
"name": "AssetSummarySettings",
|
|
12017
|
+
"namespace": "com.linkedin.pegasus2avro.settings.asset",
|
|
12018
|
+
"fields": [
|
|
12019
|
+
{
|
|
12020
|
+
"Relationship": {
|
|
12021
|
+
"/*/template": {
|
|
12022
|
+
"entityTypes": [
|
|
12023
|
+
"dataHubPageTemplate"
|
|
12024
|
+
],
|
|
12025
|
+
"name": "HasSummaryTemplate"
|
|
12026
|
+
}
|
|
12027
|
+
},
|
|
12028
|
+
"type": [
|
|
12029
|
+
{
|
|
12030
|
+
"type": "array",
|
|
12031
|
+
"items": {
|
|
12032
|
+
"type": "record",
|
|
12033
|
+
"name": "AssetSummarySettingsTemplate",
|
|
12034
|
+
"namespace": "com.linkedin.pegasus2avro.settings.asset",
|
|
12035
|
+
"fields": [
|
|
12036
|
+
{
|
|
12037
|
+
"java": {
|
|
12038
|
+
"class": "com.linkedin.pegasus2avro.common.urn.Urn"
|
|
12039
|
+
},
|
|
12040
|
+
"Urn": "Urn",
|
|
12041
|
+
"type": "string",
|
|
12042
|
+
"name": "template",
|
|
12043
|
+
"doc": "The urn of the template"
|
|
12044
|
+
}
|
|
12045
|
+
],
|
|
12046
|
+
"doc": "Object containing the template and any additional info for asset summary settings"
|
|
12047
|
+
}
|
|
12048
|
+
},
|
|
12049
|
+
"null"
|
|
12050
|
+
],
|
|
12051
|
+
"name": "templates",
|
|
12052
|
+
"default": [],
|
|
12053
|
+
"doc": "The list of templates applied to this asset in order. Right now we only expect one."
|
|
12054
|
+
}
|
|
12055
|
+
],
|
|
12056
|
+
"doc": "Information related to the asset summary for this asset"
|
|
12057
|
+
}
|
|
12058
|
+
],
|
|
12059
|
+
"name": "assetSummary",
|
|
12060
|
+
"default": null,
|
|
12061
|
+
"doc": "Information related to the asset summary for this asset"
|
|
12062
|
+
}
|
|
12063
|
+
],
|
|
12064
|
+
"doc": "Settings associated with this asset"
|
|
12065
|
+
},
|
|
11923
12066
|
{
|
|
11924
12067
|
"type": "record",
|
|
11925
12068
|
"Aspect": {
|
|
@@ -14795,9 +14938,6 @@
|
|
|
14795
14938
|
"doc": "The display name of the property. This is the name that will be shown in the UI and can be used to look up the property id."
|
|
14796
14939
|
},
|
|
14797
14940
|
{
|
|
14798
|
-
"Searchable": {
|
|
14799
|
-
"fieldType": "URN"
|
|
14800
|
-
},
|
|
14801
14941
|
"UrnValidation": {
|
|
14802
14942
|
"entityTypes": [
|
|
14803
14943
|
"dataType"
|
|
@@ -19455,11 +19595,15 @@
|
|
|
19455
19595
|
"type": {
|
|
19456
19596
|
"type": "enum",
|
|
19457
19597
|
"symbolDocs": {
|
|
19598
|
+
"ASSETS": "Module displaying the assets of parent entity",
|
|
19458
19599
|
"ASSET_COLLECTION": "A module with a collection of assets",
|
|
19600
|
+
"CHILD_HIERARCHY": "Module displaying the hierarchy of the children of a given entity. Glossary or Domains.",
|
|
19601
|
+
"DATA_PRODUCTS": "Module displaying child data products of a given domain",
|
|
19459
19602
|
"DOMAINS": "Module displaying the top domains",
|
|
19460
19603
|
"HIERARCHY": "A module displaying a hierarchy to navigate",
|
|
19461
19604
|
"LINK": "Link type module",
|
|
19462
19605
|
"OWNED_ASSETS": "Module displaying assets owned by a user",
|
|
19606
|
+
"RELATED_TERMS": "Module displaying the related terms of a given glossary term",
|
|
19463
19607
|
"RICH_TEXT": "Module containing rich text to be rendered"
|
|
19464
19608
|
},
|
|
19465
19609
|
"name": "DataHubPageModuleType",
|
|
@@ -19470,7 +19614,11 @@
|
|
|
19470
19614
|
"ASSET_COLLECTION",
|
|
19471
19615
|
"HIERARCHY",
|
|
19472
19616
|
"OWNED_ASSETS",
|
|
19473
|
-
"DOMAINS"
|
|
19617
|
+
"DOMAINS",
|
|
19618
|
+
"ASSETS",
|
|
19619
|
+
"CHILD_HIERARCHY",
|
|
19620
|
+
"DATA_PRODUCTS",
|
|
19621
|
+
"RELATED_TERMS"
|
|
19474
19622
|
],
|
|
19475
19623
|
"doc": "Enum containing the types of page modules that there are"
|
|
19476
19624
|
},
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "record",
|
|
3
|
+
"Aspect": {
|
|
4
|
+
"name": "assetSettings"
|
|
5
|
+
},
|
|
6
|
+
"name": "AssetSettings",
|
|
7
|
+
"namespace": "com.linkedin.pegasus2avro.settings.asset",
|
|
8
|
+
"fields": [
|
|
9
|
+
{
|
|
10
|
+
"type": [
|
|
11
|
+
"null",
|
|
12
|
+
{
|
|
13
|
+
"type": "record",
|
|
14
|
+
"name": "AssetSummarySettings",
|
|
15
|
+
"namespace": "com.linkedin.pegasus2avro.settings.asset",
|
|
16
|
+
"fields": [
|
|
17
|
+
{
|
|
18
|
+
"Relationship": {
|
|
19
|
+
"/*/template": {
|
|
20
|
+
"entityTypes": [
|
|
21
|
+
"dataHubPageTemplate"
|
|
22
|
+
],
|
|
23
|
+
"name": "HasSummaryTemplate"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"type": [
|
|
27
|
+
{
|
|
28
|
+
"type": "array",
|
|
29
|
+
"items": {
|
|
30
|
+
"type": "record",
|
|
31
|
+
"name": "AssetSummarySettingsTemplate",
|
|
32
|
+
"namespace": "com.linkedin.pegasus2avro.settings.asset",
|
|
33
|
+
"fields": [
|
|
34
|
+
{
|
|
35
|
+
"java": {
|
|
36
|
+
"class": "com.linkedin.pegasus2avro.common.urn.Urn"
|
|
37
|
+
},
|
|
38
|
+
"type": "string",
|
|
39
|
+
"name": "template",
|
|
40
|
+
"doc": "The urn of the template",
|
|
41
|
+
"Urn": "Urn"
|
|
42
|
+
}
|
|
43
|
+
],
|
|
44
|
+
"doc": "Object containing the template and any additional info for asset summary settings"
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"null"
|
|
48
|
+
],
|
|
49
|
+
"name": "templates",
|
|
50
|
+
"default": [],
|
|
51
|
+
"doc": "The list of templates applied to this asset in order. Right now we only expect one."
|
|
52
|
+
}
|
|
53
|
+
],
|
|
54
|
+
"doc": "Information related to the asset summary for this asset"
|
|
55
|
+
}
|
|
56
|
+
],
|
|
57
|
+
"name": "assetSummary",
|
|
58
|
+
"default": null,
|
|
59
|
+
"doc": "Information related to the asset summary for this asset"
|
|
60
|
+
}
|
|
61
|
+
],
|
|
62
|
+
"doc": "Settings associated with this asset"
|
|
63
|
+
}
|
|
@@ -18,11 +18,15 @@
|
|
|
18
18
|
"type": {
|
|
19
19
|
"type": "enum",
|
|
20
20
|
"symbolDocs": {
|
|
21
|
+
"ASSETS": "Module displaying the assets of parent entity",
|
|
21
22
|
"ASSET_COLLECTION": "A module with a collection of assets",
|
|
23
|
+
"CHILD_HIERARCHY": "Module displaying the hierarchy of the children of a given entity. Glossary or Domains.",
|
|
24
|
+
"DATA_PRODUCTS": "Module displaying child data products of a given domain",
|
|
22
25
|
"DOMAINS": "Module displaying the top domains",
|
|
23
26
|
"HIERARCHY": "A module displaying a hierarchy to navigate",
|
|
24
27
|
"LINK": "Link type module",
|
|
25
28
|
"OWNED_ASSETS": "Module displaying assets owned by a user",
|
|
29
|
+
"RELATED_TERMS": "Module displaying the related terms of a given glossary term",
|
|
26
30
|
"RICH_TEXT": "Module containing rich text to be rendered"
|
|
27
31
|
},
|
|
28
32
|
"name": "DataHubPageModuleType",
|
|
@@ -33,7 +37,11 @@
|
|
|
33
37
|
"ASSET_COLLECTION",
|
|
34
38
|
"HIERARCHY",
|
|
35
39
|
"OWNED_ASSETS",
|
|
36
|
-
"DOMAINS"
|
|
40
|
+
"DOMAINS",
|
|
41
|
+
"ASSETS",
|
|
42
|
+
"CHILD_HIERARCHY",
|
|
43
|
+
"DATA_PRODUCTS",
|
|
44
|
+
"RELATED_TERMS"
|
|
37
45
|
],
|
|
38
46
|
"doc": "Enum containing the types of page modules that there are"
|
|
39
47
|
},
|
|
@@ -39,6 +39,80 @@
|
|
|
39
39
|
"name": "rows",
|
|
40
40
|
"doc": "The rows of modules contained in this template"
|
|
41
41
|
},
|
|
42
|
+
{
|
|
43
|
+
"type": [
|
|
44
|
+
"null",
|
|
45
|
+
{
|
|
46
|
+
"type": "record",
|
|
47
|
+
"name": "DataHubPageTemplateAssetSummary",
|
|
48
|
+
"namespace": "com.linkedin.pegasus2avro.template",
|
|
49
|
+
"fields": [
|
|
50
|
+
{
|
|
51
|
+
"type": [
|
|
52
|
+
"null",
|
|
53
|
+
{
|
|
54
|
+
"type": "array",
|
|
55
|
+
"items": {
|
|
56
|
+
"type": "record",
|
|
57
|
+
"name": "SummaryElement",
|
|
58
|
+
"namespace": "com.linkedin.pegasus2avro.template",
|
|
59
|
+
"fields": [
|
|
60
|
+
{
|
|
61
|
+
"type": {
|
|
62
|
+
"type": "enum",
|
|
63
|
+
"name": "SummaryElementType",
|
|
64
|
+
"namespace": "com.linkedin.pegasus2avro.template",
|
|
65
|
+
"symbols": [
|
|
66
|
+
"CREATED",
|
|
67
|
+
"TAGS",
|
|
68
|
+
"GLOSSARY_TERMS",
|
|
69
|
+
"OWNERS",
|
|
70
|
+
"DOMAIN",
|
|
71
|
+
"STRUCTURED_PROPERTY"
|
|
72
|
+
]
|
|
73
|
+
},
|
|
74
|
+
"name": "elementType",
|
|
75
|
+
"doc": "The type of element/property"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"Relationship": {
|
|
79
|
+
"entityTypes": [
|
|
80
|
+
"structuredProperty"
|
|
81
|
+
],
|
|
82
|
+
"name": "ContainsStructuredProperty"
|
|
83
|
+
},
|
|
84
|
+
"java": {
|
|
85
|
+
"class": "com.linkedin.pegasus2avro.common.urn.Urn"
|
|
86
|
+
},
|
|
87
|
+
"type": [
|
|
88
|
+
"null",
|
|
89
|
+
"string"
|
|
90
|
+
],
|
|
91
|
+
"name": "structuredPropertyUrn",
|
|
92
|
+
"default": null,
|
|
93
|
+
"doc": "The urn of the structured property shown. Required if propertyType is STRUCTURED_PROPERTY",
|
|
94
|
+
"Urn": "Urn",
|
|
95
|
+
"entityTypes": [
|
|
96
|
+
"structuredProperty"
|
|
97
|
+
]
|
|
98
|
+
}
|
|
99
|
+
],
|
|
100
|
+
"doc": "Info for a given asset summary element"
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
],
|
|
104
|
+
"name": "summaryElements",
|
|
105
|
+
"default": null,
|
|
106
|
+
"doc": "The optional list of properties shown on an asset summary page header."
|
|
107
|
+
}
|
|
108
|
+
],
|
|
109
|
+
"doc": "The page template info for asset summaries"
|
|
110
|
+
}
|
|
111
|
+
],
|
|
112
|
+
"name": "assetSummary",
|
|
113
|
+
"default": null,
|
|
114
|
+
"doc": "The optional info for asset summaries. Should be populated if surfaceType is ASSET_SUMMARY"
|
|
115
|
+
},
|
|
42
116
|
{
|
|
43
117
|
"type": {
|
|
44
118
|
"type": "record",
|
|
@@ -52,12 +126,14 @@
|
|
|
52
126
|
"type": {
|
|
53
127
|
"type": "enum",
|
|
54
128
|
"symbolDocs": {
|
|
129
|
+
"ASSET_SUMMARY": "This template applies to what to display on asset summary pages",
|
|
55
130
|
"HOME_PAGE": "This template applies to what to display on the home page for users."
|
|
56
131
|
},
|
|
57
132
|
"name": "PageTemplateSurfaceType",
|
|
58
133
|
"namespace": "com.linkedin.pegasus2avro.template",
|
|
59
134
|
"symbols": [
|
|
60
|
-
"HOME_PAGE"
|
|
135
|
+
"HOME_PAGE",
|
|
136
|
+
"ASSET_SUMMARY"
|
|
61
137
|
]
|
|
62
138
|
},
|
|
63
139
|
"name": "surfaceType",
|
|
@@ -103,11 +103,11 @@
|
|
|
103
103
|
"filterNameOverride": "Priority"
|
|
104
104
|
},
|
|
105
105
|
"type": [
|
|
106
|
-
"
|
|
107
|
-
"
|
|
106
|
+
"null",
|
|
107
|
+
"int"
|
|
108
108
|
],
|
|
109
109
|
"name": "priority",
|
|
110
|
-
"default":
|
|
110
|
+
"default": null,
|
|
111
111
|
"doc": "A numeric severity or priority for the incident. On the UI we will translate this into something easy to understand.\nCurrently supported: 0 - CRITICAL, 1 - HIGH, 2 - MED, 3 - LOW\n(We probably should have modeled as an enum)"
|
|
112
112
|
},
|
|
113
113
|
{
|
datahub/sdk/chart.py
CHANGED
|
@@ -3,6 +3,7 @@ from __future__ import annotations
|
|
|
3
3
|
from datetime import datetime
|
|
4
4
|
from typing import Dict, List, Optional, Type, Union
|
|
5
5
|
|
|
6
|
+
from deprecated.sphinx import deprecated
|
|
6
7
|
from typing_extensions import Self
|
|
7
8
|
|
|
8
9
|
import datahub.metadata.schema_classes as models
|
|
@@ -23,11 +24,13 @@ from datahub.sdk._shared import (
|
|
|
23
24
|
HasTerms,
|
|
24
25
|
LinksInputType,
|
|
25
26
|
OwnersInputType,
|
|
27
|
+
ParentContainerInputType,
|
|
26
28
|
TagsInputType,
|
|
27
29
|
TermsInputType,
|
|
28
30
|
)
|
|
29
31
|
from datahub.sdk.dataset import Dataset
|
|
30
32
|
from datahub.sdk.entity import Entity, ExtraAspectsType
|
|
33
|
+
from datahub.utilities.sentinels import Unset, unset
|
|
31
34
|
|
|
32
35
|
|
|
33
36
|
class Chart(
|
|
@@ -70,14 +73,15 @@ class Chart(
|
|
|
70
73
|
last_refreshed: Optional[datetime] = None,
|
|
71
74
|
chart_type: Optional[Union[str, models.ChartTypeClass]] = None,
|
|
72
75
|
access: Optional[str] = None,
|
|
76
|
+
input_datasets: Optional[List[Union[DatasetUrnOrStr, Dataset]]] = None,
|
|
73
77
|
# Standard aspects.
|
|
78
|
+
parent_container: ParentContainerInputType | Unset = unset,
|
|
74
79
|
subtype: Optional[str] = None,
|
|
75
80
|
owners: Optional[OwnersInputType] = None,
|
|
76
81
|
links: Optional[LinksInputType] = None,
|
|
77
82
|
tags: Optional[TagsInputType] = None,
|
|
78
83
|
terms: Optional[TermsInputType] = None,
|
|
79
84
|
domain: Optional[DomainInputType] = None,
|
|
80
|
-
input_datasets: Optional[List[Union[DatasetUrnOrStr, Dataset]]] = None,
|
|
81
85
|
extra_aspects: ExtraAspectsType = None,
|
|
82
86
|
):
|
|
83
87
|
"""Initialize a new Chart instance."""
|
|
@@ -91,19 +95,31 @@ class Chart(
|
|
|
91
95
|
|
|
92
96
|
self._set_platform_instance(platform, platform_instance)
|
|
93
97
|
|
|
94
|
-
|
|
98
|
+
self._ensure_chart_props(display_name=display_name)
|
|
99
|
+
|
|
100
|
+
if display_name is not None:
|
|
101
|
+
self.set_display_name(display_name)
|
|
102
|
+
if description is not None:
|
|
103
|
+
self.set_description(description)
|
|
95
104
|
if external_url is not None:
|
|
96
105
|
self.set_external_url(external_url)
|
|
97
106
|
if chart_url is not None:
|
|
98
107
|
self.set_chart_url(chart_url)
|
|
99
108
|
if custom_properties is not None:
|
|
100
109
|
self.set_custom_properties(custom_properties)
|
|
110
|
+
if last_modified is not None:
|
|
111
|
+
self.set_last_modified(last_modified)
|
|
101
112
|
if last_refreshed is not None:
|
|
102
113
|
self.set_last_refreshed(last_refreshed)
|
|
103
114
|
if chart_type is not None:
|
|
104
115
|
self.set_chart_type(chart_type)
|
|
105
116
|
if access is not None:
|
|
106
117
|
self.set_access(access)
|
|
118
|
+
if input_datasets is not None:
|
|
119
|
+
self.set_input_datasets(input_datasets)
|
|
120
|
+
|
|
121
|
+
if parent_container is not unset:
|
|
122
|
+
self._set_container(parent_container)
|
|
107
123
|
if subtype is not None:
|
|
108
124
|
self.set_subtype(subtype)
|
|
109
125
|
if owners is not None:
|
|
@@ -116,14 +132,6 @@ class Chart(
|
|
|
116
132
|
self.set_terms(terms)
|
|
117
133
|
if domain is not None:
|
|
118
134
|
self.set_domain(domain)
|
|
119
|
-
if last_modified is not None:
|
|
120
|
-
self.set_last_modified(last_modified)
|
|
121
|
-
if input_datasets is not None:
|
|
122
|
-
self.set_input_datasets(input_datasets)
|
|
123
|
-
if description is not None:
|
|
124
|
-
self.set_description(description)
|
|
125
|
-
if display_name is not None:
|
|
126
|
-
self.set_display_name(display_name)
|
|
127
135
|
|
|
128
136
|
@classmethod
|
|
129
137
|
def _new_from_graph(cls, urn: Urn, current_aspects: models.AspectBag) -> Self:
|
|
@@ -139,11 +147,13 @@ class Chart(
|
|
|
139
147
|
assert isinstance(self._urn, ChartUrn)
|
|
140
148
|
return self._urn
|
|
141
149
|
|
|
142
|
-
def _ensure_chart_props(
|
|
150
|
+
def _ensure_chart_props(
|
|
151
|
+
self, display_name: Optional[str] = None
|
|
152
|
+
) -> models.ChartInfoClass:
|
|
143
153
|
"""Ensure chart properties exist, using a safer approach."""
|
|
144
154
|
return self._setdefault_aspect(
|
|
145
155
|
models.ChartInfoClass(
|
|
146
|
-
title=self.urn.chart_id,
|
|
156
|
+
title=display_name or self.urn.chart_id,
|
|
147
157
|
description="",
|
|
148
158
|
lastModified=models.ChangeAuditStampsClass(),
|
|
149
159
|
)
|
|
@@ -155,13 +165,15 @@ class Chart(
|
|
|
155
165
|
return self.urn.chart_id
|
|
156
166
|
|
|
157
167
|
@property
|
|
168
|
+
@deprecated("Use display_name instead", version="1.2.0.7")
|
|
158
169
|
def title(self) -> str:
|
|
159
|
-
"""Get the
|
|
160
|
-
return self.
|
|
170
|
+
"""Get the display name of the chart."""
|
|
171
|
+
return self.display_name
|
|
161
172
|
|
|
173
|
+
@deprecated("Use set_display_name instead", version="1.2.0.7")
|
|
162
174
|
def set_title(self, title: str) -> None:
|
|
163
|
-
"""Set the
|
|
164
|
-
self.
|
|
175
|
+
"""Set the display name of the chart."""
|
|
176
|
+
self.set_display_name(title)
|
|
165
177
|
|
|
166
178
|
@property
|
|
167
179
|
def description(self) -> Optional[str]:
|
|
@@ -173,13 +185,13 @@ class Chart(
|
|
|
173
185
|
self._ensure_chart_props().description = description
|
|
174
186
|
|
|
175
187
|
@property
|
|
176
|
-
def display_name(self) ->
|
|
188
|
+
def display_name(self) -> str:
|
|
177
189
|
"""Get the display name of the chart."""
|
|
178
|
-
return self.title
|
|
190
|
+
return self._ensure_chart_props().title
|
|
179
191
|
|
|
180
192
|
def set_display_name(self, display_name: str) -> None:
|
|
181
193
|
"""Set the display name of the chart."""
|
|
182
|
-
self.
|
|
194
|
+
self._ensure_chart_props().title = display_name
|
|
183
195
|
|
|
184
196
|
@property
|
|
185
197
|
def external_url(self) -> Optional[str]:
|
|
@@ -250,9 +262,11 @@ class Chart(
|
|
|
250
262
|
def set_chart_type(self, chart_type: Union[str, models.ChartTypeClass]) -> None:
|
|
251
263
|
"""Set the type of the chart."""
|
|
252
264
|
if isinstance(chart_type, str):
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
265
|
+
chart_type_options = get_enum_options(models.ChartTypeClass)
|
|
266
|
+
if chart_type not in chart_type_options:
|
|
267
|
+
raise ValueError(
|
|
268
|
+
f"Invalid chart type: {chart_type}; valid types are {chart_type_options}"
|
|
269
|
+
)
|
|
256
270
|
self._ensure_chart_props().type = chart_type
|
|
257
271
|
|
|
258
272
|
@property
|