mirror of
https://github.com/datahub-project/datahub.git
synced 2025-11-14 18:31:59 +00:00
feat(dashboard): Dashboard models update (#1932)
* feat(dashboard): Dashboard models update * Keep chartId/dashboardId fields in the URN definitions and add fields for chartURL/dashboardURL into info aspects * Rebase and address some comments
This commit is contained in:
parent
32e18a1fc7
commit
733893f5f9
32
gms/api/src/main/pegasus/com/linkedin/dashboard/Chart.pdl
Normal file
32
gms/api/src/main/pegasus/com/linkedin/dashboard/Chart.pdl
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
namespace com.linkedin.dashboard
|
||||||
|
|
||||||
|
import com.linkedin.chart.ChartInfo
|
||||||
|
import com.linkedin.chart.ChartQuery
|
||||||
|
import com.linkedin.common.Ownership
|
||||||
|
import com.linkedin.common.Status
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Metadata for a chart
|
||||||
|
*/
|
||||||
|
record Chart includes ChartKey {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Basic chart information
|
||||||
|
*/
|
||||||
|
info: optional ChartInfo
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Information for the chart query which is used for getting data of the chart
|
||||||
|
*/
|
||||||
|
query: optional ChartQuery
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Ownership information for the chart
|
||||||
|
*/
|
||||||
|
ownership: optional Ownership
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Status information for the chart such as removed or not
|
||||||
|
*/
|
||||||
|
status: optional Status
|
||||||
|
}
|
||||||
25
gms/api/src/main/pegasus/com/linkedin/dashboard/ChartKey.pdl
Normal file
25
gms/api/src/main/pegasus/com/linkedin/dashboard/ChartKey.pdl
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
namespace com.linkedin.dashboard
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Key for chart resource
|
||||||
|
*/
|
||||||
|
record ChartKey {
|
||||||
|
/**
|
||||||
|
* The name of the dashboard tool such as looker, redash etc.
|
||||||
|
*/
|
||||||
|
@validate.strlen = {
|
||||||
|
"max" : 20,
|
||||||
|
"min" : 1
|
||||||
|
}
|
||||||
|
tool: string
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Unique id for the chart. This id should be globally unique for a dashboarding tool even when there are multiple deployments of it. As an example, chart URL could be used here for Looker such as 'looker.linkedin.com/looks/1234'
|
||||||
|
*/
|
||||||
|
@validate.strlen = {
|
||||||
|
"max" : 200,
|
||||||
|
"min" : 1
|
||||||
|
}
|
||||||
|
chartId: string
|
||||||
|
}
|
||||||
@ -0,0 +1,25 @@
|
|||||||
|
namespace com.linkedin.dashboard
|
||||||
|
|
||||||
|
import com.linkedin.common.Ownership
|
||||||
|
import com.linkedin.common.Status
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Metadata for a dashboard
|
||||||
|
*/
|
||||||
|
record Dashboard includes DashboardKey {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Basic dashboard information
|
||||||
|
*/
|
||||||
|
info: optional DashboardInfo
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Ownership information for the dashboard
|
||||||
|
*/
|
||||||
|
ownership: optional Ownership
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Status information for the dashboard such as removed or not
|
||||||
|
*/
|
||||||
|
status: optional Status
|
||||||
|
}
|
||||||
@ -0,0 +1,25 @@
|
|||||||
|
namespace com.linkedin.dashboard
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Key for dashboard resource
|
||||||
|
*/
|
||||||
|
record DashboardKey {
|
||||||
|
/**
|
||||||
|
* The name of the dashboard tool such as looker, redash etc.
|
||||||
|
*/
|
||||||
|
@validate.strlen = {
|
||||||
|
"max" : 20,
|
||||||
|
"min" : 1
|
||||||
|
}
|
||||||
|
tool: string
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Unique id for the dashboard. This id should be globally unique for a dashboarding tool even when there are multiple deployments of it. As an example, dashboard URL could be used here for Looker such as 'looker.linkedin.com/dashboards/1234'
|
||||||
|
*/
|
||||||
|
@validate.strlen = {
|
||||||
|
"max" : 200,
|
||||||
|
"min" : 1
|
||||||
|
}
|
||||||
|
dashboardId: string
|
||||||
|
}
|
||||||
@ -11,7 +11,6 @@ public final class ChartUrn extends Urn {
|
|||||||
public static final String ENTITY_TYPE = "chart";
|
public static final String ENTITY_TYPE = "chart";
|
||||||
|
|
||||||
private final String _dashboardTool;
|
private final String _dashboardTool;
|
||||||
|
|
||||||
private final String _chartId;
|
private final String _chartId;
|
||||||
|
|
||||||
public ChartUrn(String dashboardTool, String chartId) {
|
public ChartUrn(String dashboardTool, String chartId) {
|
||||||
|
|||||||
@ -19,12 +19,12 @@ namespace com.linkedin.common
|
|||||||
"type" : "string",
|
"type" : "string",
|
||||||
"maxLength" : 20
|
"maxLength" : 20
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name" : "chartId",
|
"name" : "chartId",
|
||||||
"doc" : "Unique id of the chart assigned by the specific dashboard tool",
|
"doc" : "Unique id for the chart. This id should be globally unique for a dashboarding tool even when there are multiple deployments of it. As an example, chart URL could be used here for Looker such as 'looker.linkedin.com/looks/1234'",
|
||||||
"type" : "string",
|
"type" : "string",
|
||||||
"maxLength" : 20
|
"maxLength" : 200
|
||||||
}],
|
}],
|
||||||
"maxLength" : 36
|
"maxLength" : 236
|
||||||
}
|
}
|
||||||
typeref ChartUrn = string
|
typeref ChartUrn = string
|
||||||
@ -21,10 +21,10 @@ namespace com.linkedin.common
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name" : "dashboardId",
|
"name" : "dashboardId",
|
||||||
"doc" : "Unique id of the dashboard assigned by the specific dashboard tool",
|
"doc" : "Unique id for the dashboard. This id should be globally unique for a dashboarding tool even when there are multiple deployments of it. As an example, dashboard URL could be used here for Looker such as 'looker.linkedin.com/dashboards/1234'",
|
||||||
"type" : "string",
|
"type" : "string",
|
||||||
"maxLength" : 20
|
"maxLength" : 200
|
||||||
}],
|
}],
|
||||||
"maxLength" : 36
|
"maxLength" : 240
|
||||||
}
|
}
|
||||||
typeref DashboardUrn = string
|
typeref DashboardUrn = string
|
||||||
@ -3,6 +3,7 @@ namespace com.linkedin.chart
|
|||||||
import com.linkedin.common.AccessLevel
|
import com.linkedin.common.AccessLevel
|
||||||
import com.linkedin.common.ChangeAuditStamps
|
import com.linkedin.common.ChangeAuditStamps
|
||||||
import com.linkedin.common.Time
|
import com.linkedin.common.Time
|
||||||
|
import com.linkedin.common.Url
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Information about a chart
|
* Information about a chart
|
||||||
@ -24,6 +25,11 @@ record ChartInfo {
|
|||||||
*/
|
*/
|
||||||
lastModified: ChangeAuditStamps
|
lastModified: ChangeAuditStamps
|
||||||
|
|
||||||
|
/**
|
||||||
|
* URL for the chart. This could be used as an external link on DataHub to allow users access/view the chart
|
||||||
|
*/
|
||||||
|
chartUrl: Url
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Data sources for the chart
|
* Data sources for the chart
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -13,16 +13,5 @@ record ChartQuery {
|
|||||||
/**
|
/**
|
||||||
* Chart query type
|
* Chart query type
|
||||||
*/
|
*/
|
||||||
type: enum ChartQueryType {
|
type: ChartQueryType
|
||||||
|
|
||||||
/**
|
|
||||||
* LookML queries
|
|
||||||
*/
|
|
||||||
LOOKML
|
|
||||||
|
|
||||||
/**
|
|
||||||
* SQL type queries
|
|
||||||
*/
|
|
||||||
SQL
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@ -0,0 +1,14 @@
|
|||||||
|
namespace com.linkedin.chart
|
||||||
|
|
||||||
|
enum ChartQueryType {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* LookML queries
|
||||||
|
*/
|
||||||
|
LOOKML
|
||||||
|
|
||||||
|
/**
|
||||||
|
* SQL type queries
|
||||||
|
*/
|
||||||
|
SQL
|
||||||
|
}
|
||||||
@ -4,6 +4,7 @@ import com.linkedin.common.AccessLevel
|
|||||||
import com.linkedin.common.ChangeAuditStamps
|
import com.linkedin.common.ChangeAuditStamps
|
||||||
import com.linkedin.common.ChartUrn
|
import com.linkedin.common.ChartUrn
|
||||||
import com.linkedin.common.Time
|
import com.linkedin.common.Time
|
||||||
|
import com.linkedin.common.Url
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Information about a dashboard
|
* Information about a dashboard
|
||||||
@ -30,6 +31,11 @@ record DashboardInfo {
|
|||||||
*/
|
*/
|
||||||
lastModified: ChangeAuditStamps
|
lastModified: ChangeAuditStamps
|
||||||
|
|
||||||
|
/**
|
||||||
|
* URL for the dashboard. This could be used as an external link on DataHub to allow users access/view the dashboard
|
||||||
|
*/
|
||||||
|
dashboardUrl: optional Url
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Access level for the dashboard
|
* Access level for the dashboard
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -1,7 +1,9 @@
|
|||||||
namespace com.linkedin.metadata.search
|
namespace com.linkedin.metadata.search
|
||||||
|
|
||||||
|
import com.linkedin.chart.ChartQueryType
|
||||||
|
import com.linkedin.chart.ChartType
|
||||||
|
import com.linkedin.common.AccessLevel
|
||||||
import com.linkedin.common.ChartUrn
|
import com.linkedin.common.ChartUrn
|
||||||
import com.linkedin.common.DatasetUrn
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Data model for Chart entity search
|
* Data model for Chart entity search
|
||||||
@ -28,15 +30,10 @@ record ChartDocument includes BaseDocument {
|
|||||||
*/
|
*/
|
||||||
tool: optional string
|
tool: optional string
|
||||||
|
|
||||||
/**
|
|
||||||
* Input datasets for the chart
|
|
||||||
*/
|
|
||||||
inputs: optional array[DatasetUrn]
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Chart query type
|
* Chart query type
|
||||||
*/
|
*/
|
||||||
queryType: optional string
|
queryType: optional ChartQueryType
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* LDAP usernames of corp users who are the owners of this chart
|
* LDAP usernames of corp users who are the owners of this chart
|
||||||
@ -46,10 +43,10 @@ record ChartDocument includes BaseDocument {
|
|||||||
/**
|
/**
|
||||||
* Type of the chart
|
* Type of the chart
|
||||||
*/
|
*/
|
||||||
type: optional string
|
type: optional ChartType
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Access level for the chart
|
* Access level for the chart
|
||||||
*/
|
*/
|
||||||
access: optional string
|
access: optional AccessLevel
|
||||||
}
|
}
|
||||||
@ -1,6 +1,6 @@
|
|||||||
namespace com.linkedin.metadata.search
|
namespace com.linkedin.metadata.search
|
||||||
|
|
||||||
import com.linkedin.common.ChartUrn
|
import com.linkedin.common.AccessLevel
|
||||||
import com.linkedin.common.DashboardUrn
|
import com.linkedin.common.DashboardUrn
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -28,11 +28,6 @@ record DashboardDocument includes BaseDocument {
|
|||||||
*/
|
*/
|
||||||
tool: optional string
|
tool: optional string
|
||||||
|
|
||||||
/**
|
|
||||||
* Ids of the charts in the dashboard
|
|
||||||
*/
|
|
||||||
chartIds: optional array[string]
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* LDAP usernames of corp users who are the owners of this dashboard
|
* LDAP usernames of corp users who are the owners of this dashboard
|
||||||
*/
|
*/
|
||||||
@ -41,5 +36,5 @@ record DashboardDocument includes BaseDocument {
|
|||||||
/**
|
/**
|
||||||
* Access level for the dashboard
|
* Access level for the dashboard
|
||||||
*/
|
*/
|
||||||
access: optional string
|
access: optional AccessLevel
|
||||||
}
|
}
|
||||||
@ -4,8 +4,10 @@ namespace com.linkedin.metadata.snapshot
|
|||||||
* A union of all supported metadata snapshot types.
|
* A union of all supported metadata snapshot types.
|
||||||
*/
|
*/
|
||||||
typeref Snapshot = union[
|
typeref Snapshot = union[
|
||||||
|
ChartSnapshot,
|
||||||
CorpGroupSnapshot,
|
CorpGroupSnapshot,
|
||||||
CorpUserSnapshot,
|
CorpUserSnapshot,
|
||||||
|
DashboardSnapshot,
|
||||||
DatasetSnapshot,
|
DatasetSnapshot,
|
||||||
DataProcessSnapshot,
|
DataProcessSnapshot,
|
||||||
MLModelSnapshot,
|
MLModelSnapshot,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user