Skip to content

feat: update column stats ui, add sort by usage to columns - #1389

Merged
kgopal492 merged 3 commits into
pinterest:masterfrom
kgopal492:kgopal/table-meta
Dec 19, 2023
Merged

kgopal492 merged 3 commits into
pinterest:masterfrom
kgopal492:kgopal/table-meta

Conversation

@kgopal492

Copy link
Copy Markdown
Contributor

Screenshot 2023-12-19 at 11 39 36 AM

  • Update column stats UI to show table column stats as tags (rather than additional rows)
  • Add ability to sort columns by usage
  • Query all table column details from table column page to be able to sort columns by usage

@kgopal492
kgopal492 requested review from czgu and jczhong84 December 19, 2023 17:50
Comment thread querybook/server/logic/metastore.py Outdated
Comment thread querybook/webapp/components/DataTableStats/DataTableColumnStats.tsx Outdated
const [orderColumnsBy, setOrdeColumnsBy] = React.useState(true);
const [orderBoardBy, setOrderBoardBy] = React.useState(false);
const [orderColumnsBy, setOrderColumnsBy] =
React.useState<ColumnOrderBy>('usage');

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

COLUMN_STATS_USAGE_KEY?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

if there is no usage, what would happen?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This 'usage' string just corresponds to the column order by type (so shouldn't use the constant here). If there's no usage, they're all treated as 0 usage. But I updated it so that you can't see the sort by usage option if there are no usages available for any of the columns so it isn't confusing to users.

Comment thread querybook/webapp/components/DataTableViewColumn/DataTableViewColumn.tsx Outdated
@kgopal492
kgopal492 merged commit 370948f into pinterest:master Dec 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants