Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ui): Sort top users by their query count in datasets stats tab #7148

Merged
merged 2 commits into from
Jan 27, 2023

Conversation

jaykadambi
Copy link
Contributor

@jaykadambi jaykadambi commented Jan 26, 2023

Summary:

Currently the top users within the stats tab of a Dataset is not sorted by their query count. This change reflects the top users by their counts.

Example:

image

Sample usage statistics:

"aspectName" : "datasetUsageStatistics", "aspect" : { "value" : "{ \"timestampMillis\":1674749347000,\"partitionSpec\": {\"type\": \"FULL_TABLE\", \"partition\": \"FULL_TABLE_SNAPSHOT\"}, \"totalSqlQueries\": 155, \"uniqueUserCount\": 1, \"userCounts\": [{\"user\": \"urn:li:corpuser:datahub\", \"count\": 21, \"userEmail\": \"[email protected]\"},{\"user\": \"urn:li:corpuser:jkadambi\", \"count\": 100, \"userEmail\": \"[email protected]\"},{\"user\": \"urn:li:corpuser:eaipeas\", \"count\": 9920, \"userEmail\":\"[email protected]\"},{\"user\": \"urn:li:corpuser:jac_script\", \"count\": 35, \"userEmail\": \"[email protected]\"},{\"user\": \"urn:li:corpuser:dbrumba2\", \"count\": 2035, \"userEmail\": \"[email protected]\"}]}", "contentType": "application/json"

Checklist

  • The PR conforms to DataHub's Contributing Guideline (particularly Commit Message Format)
  • Links to related issues (if applicable)
  • Tests for the changes have been added/updated (if applicable)
  • Docs related to the changes have been added/updated (if applicable). If a new feature has been added a Usage Guide has been added for the same.
  • For any breaking change/potential downtime/deprecation/big changes an entry has been made in Updating DataHub

@github-actions github-actions bot added the product PR or Issue related to the DataHub UI/UX label Jan 26, 2023
@jaykadambi jaykadambi changed the title fix(ui): Sort top users by their usage count in datasets stats tab fix(ui): Sort top users by their query count in datasets stats tab Jan 26, 2023
Copy link
Collaborator

@jjoyce0510 jjoyce0510 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thank you!

@jjoyce0510
Copy link
Collaborator

Actually it looks like we are failing the frontend build. Can you please make sure the usage of useMemo is NOT conditional before we accept this?

@jjoyce0510
Copy link
Collaborator

(You should not need to use useMemo at all)

@jaykadambi
Copy link
Contributor Author

(You should not need to use useMemo at all)

Will do this shortly. I wondered if I should in the first place. Let me remove it.

@jaykadambi
Copy link
Contributor Author

(You should not need to use useMemo at all)

@jjoyce0510 - removed useMemo. Please review and accept. Thanks!

@jjoyce0510
Copy link
Collaborator

(Assuming you've tested this locally)

Once we are green we will merge it in. Thanks!

@jaykadambi
Copy link
Contributor Author

(Assuming you've tested this locally)

Once we are green we will merge it in. Thanks!

Yes. Looks green. Thanks!

@jjoyce0510 jjoyce0510 merged commit 1192dbf into datahub-project:master Jan 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
product PR or Issue related to the DataHub UI/UX
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants