Skip to content

Commit

Permalink
feat(GMS): Adding Dashboard Usage Models (datahub-project#5399)
Browse files Browse the repository at this point in the history
  • Loading branch information
jjoyce0510 authored and maggiehays committed Aug 1, 2022
1 parent 0a4e427 commit 1a73ab3
Show file tree
Hide file tree
Showing 3 changed files with 87 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
namespace com.linkedin.dashboard

import com.linkedin.timeseries.TimeseriesAspectBase

/**
* Stats corresponding to dashboard's usage.
*
* If this aspect represents the latest snapshot of the statistics about a Dashboard, the eventGranularity field should be null.
* If this aspect represents a bucketed window of usage statistics (e.g. over a day), then the eventGranularity field should be set accordingly.
*/
@Aspect = {
"name": "dashboardUsageStatistics",
"type": "timeseries",
}
record DashboardUsageStatistics includes TimeseriesAspectBase {
/**
* The total number of times dashboard has been viewed
*/
@TimeseriesField = {}
viewsCount: optional int

/**
* The total number of dashboard executions (refreshes / syncs)
*/
@TimeseriesField = {}
executionsCount: optional int

/**
* Unique user count
*/
@TimeseriesField = {}
uniqueUserCount: optional int

/**
* Users within this bucket, with frequency counts
*/
@TimeseriesFieldCollection = {"key":"user"}
userCounts: optional array[DashboardUserUsageCounts]

/**
* The total number of times that the dashboard has been favorited
*/
@TimeseriesField = {}
favoritesCount: optional int

/**
* Last viewed at
*
* This should not be set in cases where statistics are windowed.
*/
@TimeseriesField = {}
lastViewedAt: optional long

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
namespace com.linkedin.dashboard

import com.linkedin.common.Urn

/**
* Records a single user's usage counts for a given resource
*/
record DashboardUserUsageCounts {
/**
* The unique id of the user.
*/
user: Urn

/**
* The number of times the user has viewed the dashboard
*/
@TimeseriesField = {}
viewsCount: optional int

/**
* The number of times the user has executed (refreshed) the dashboard
*/
@TimeseriesField = {}
executionsCount: optional int

/**
* Normalized numeric metric representing user's dashboard usage -- the number of times the user executed or viewed the dashboard.
*/
@TimeseriesField = {}
usageCount: optional int

}
1 change: 1 addition & 0 deletions metadata-models/src/main/resources/entity-registry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ entities:
- domains
- container
- deprecation
- dashboardUsageStatistics
- name: notebook
doc: Notebook represents a combination of query, text, chart and etc. This is in BETA version
keyAspect: notebookKey
Expand Down

0 comments on commit 1a73ab3

Please sign in to comment.