forked from datahub-project/datahub
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(GMS): Adding Dashboard Usage Models (datahub-project#5399)
- Loading branch information
1 parent
0a4e427
commit 1a73ab3
Showing
3 changed files
with
87 additions
and
0 deletions.
There are no files selected for viewing
54 changes: 54 additions & 0 deletions
54
metadata-models/src/main/pegasus/com/linkedin/dashboard/DashboardUsageStatistics.pdl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
||
} |
32 changes: 32 additions & 0 deletions
32
metadata-models/src/main/pegasus/com/linkedin/dashboard/DashboardUserUsageCounts.pdl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters