(defaultUsersFilter);
const pagination = usePagination(DEFAULT_PAGE_SIZE);
@@ -50,11 +43,7 @@ export const usePopularQueries = ({
start,
count,
source: QuerySource.System,
- sortInput:
- sortField && sortOrder
- ? { sortCriterion: { field: sortField, sortOrder } }
- : { sortCriterion: { field: 'runsPercentileLast30days', sortOrder: SortOrder.Descending } },
-
+ sortInput: sortField && sortOrder ? { sortCriterion: { field: sortField, sortOrder } } : null,
orFilters: [{ and: andFilters }],
},
},
diff --git a/datahub-web-react/src/app/entityV2/shared/tabs/Dataset/Queries/useQueryTableColumns.tsx b/datahub-web-react/src/app/entityV2/shared/tabs/Dataset/Queries/useQueryTableColumns.tsx
index 03ab88486b..3ec1170267 100644
--- a/datahub-web-react/src/app/entityV2/shared/tabs/Dataset/Queries/useQueryTableColumns.tsx
+++ b/datahub-web-react/src/app/entityV2/shared/tabs/Dataset/Queries/useQueryTableColumns.tsx
@@ -1,16 +1,14 @@
import moment from 'moment';
import React from 'react';
import styled from 'styled-components';
-import { Tooltip } from '@components';
import { Query } from './types';
import QueryComponent from './Query';
-import { EditDeleteColumn, QueryCreatedBy, QueryDescription, PopularityColumn, ColumnsColumn } from './queryColumns';
+import { EditDeleteColumn, QueryCreatedBy, QueryDescription, ColumnsColumn } from './queryColumns';
import { CorpUser, Entity } from '../../../../../../types.generated';
import { EntityLink } from '../../../../../homeV2/reference/sections/EntityLink';
import { useEntityRegistryV2 } from '../../../../../useEntityRegistry';
import { Sorting } from '../../../../../sharedV2/sorting/useSorting';
import TopUsersFacepile from '../../../containers/profile/sidebar/shared/TopUsersFacepile';
-import { toRelativeTimeString } from '../../../../../shared/time/timeUtils';
const UsersWrapper = styled.div`
display: flex;
@@ -145,7 +143,7 @@ export default function useQueryTableColumns({
key: 'usedBy',
className: 'usedBy',
sorter: shouldRelyOnBackendSorting
- ? false // we don't support sorting by topUsersLast30DaysFeature on backend since it is a text field
+ ? false
: (queryA, queryB) => {
if (!queryA.usedBy || !queryA.usedBy[0] || !queryB.usedBy || !queryB.usedBy[0]) return 0;
const usedByA = entityRegistry.getDisplayName(queryA.usedBy[0].type, queryA.usedBy[0]);
@@ -161,17 +159,6 @@ export default function useQueryTableColumns({
},
};
- const popularityColumn = {
- title: 'Popularity',
- key: 'popularity',
- field: 'runsPercentileLast30days',
- width: 110,
- sorter: shouldRelyOnBackendSorting
- ? true
- : (queryA, queryB) => queryA.runsPercentileLast30days - queryB.runsPercentileLast30days,
- render: (query: Query) => ,
- };
-
const columnsColumn = {
title: 'Columns',
key: 'columns',
@@ -179,25 +166,6 @@ export default function useQueryTableColumns({
render: (query: Query) => ,
};
- const lastRunColumn = {
- title: 'Last Run',
- dataIndex: 'lastRun',
- key: 'lastRun',
- field: 'lastExecutedAtFeature',
- className: 'lastRun',
- sorter: shouldRelyOnBackendSorting ? true : (queryA, queryB) => queryA.lastRun - queryB.lastRun,
- render: (lastRun: string) => {
- if (!lastRun) return null;
- return (
-
-
- {toRelativeTimeString(new Date(lastRun).getTime())}
-
-
- );
- },
- };
-
const editColumn = {
title: '',
key: 'edit',
@@ -220,9 +188,7 @@ export default function useQueryTableColumns({
createdDateColumn,
powersColumn,
usedByColumn,
- popularityColumn,
columnsColumn,
- lastRunColumn,
editColumn,
};
}
diff --git a/datahub-web-react/src/app/entityV2/shared/tabs/Dataset/Schema/components/SchemaFieldDrawer/SchemaFieldQueriesSidebarTab.tsx b/datahub-web-react/src/app/entityV2/shared/tabs/Dataset/Schema/components/SchemaFieldDrawer/SchemaFieldQueriesSidebarTab.tsx
index 3963b3f384..ba860a616f 100644
--- a/datahub-web-react/src/app/entityV2/shared/tabs/Dataset/Schema/components/SchemaFieldDrawer/SchemaFieldQueriesSidebarTab.tsx
+++ b/datahub-web-react/src/app/entityV2/shared/tabs/Dataset/Schema/components/SchemaFieldDrawer/SchemaFieldQueriesSidebarTab.tsx
@@ -8,7 +8,7 @@ import NoStatsAvailble from '../../../../../../../../images/no-stats-available.s
import { useBaseEntity, useRouteToTab } from '../../../../../../../entity/shared/EntityContext';
import { ANTD_GRAY } from '../../../../../constants';
import Query from '../../../Queries/Query';
-import { PopularityColumn, QueryCreatedBy } from '../../../Queries/queryColumns';
+import { QueryCreatedBy } from '../../../Queries/queryColumns';
import { usePopularQueries } from '../../../Queries/usePopularQueries';
import { GetDatasetQuery } from '../../../../../../../../graphql/dataset.generated';
import Loading from '../../../../../../../shared/Loading';
@@ -57,15 +57,6 @@ const SubtitleSection = styled.div`
flex-direction: row;
`;
-const PopularityLabel = styled.span`
- line-height: 26px;
- margin-right: 8px;
-`;
-
-const PopularityColumnContainer = styled.div`
- margin-bottom: 5px;
-`;
-
const QUERIES_TO_SHOW = 6;
const SeeAllButton = styled(Button)`
@@ -173,12 +164,6 @@ export default function SchemaFieldQueriesSidebarTab({ properties: { fieldPath }
)}
on {moment(query.lastRun).format('MM/DD/YYYY')}
-
- Popularity
-
-
-
-
diff --git a/datahub-web-react/src/app/homeV2/content/tabs/discovery/sections/insight/Insights.tsx b/datahub-web-react/src/app/homeV2/content/tabs/discovery/sections/insight/Insights.tsx
index f912330a5e..df65f23b1b 100644
--- a/datahub-web-react/src/app/homeV2/content/tabs/discovery/sections/insight/Insights.tsx
+++ b/datahub-web-react/src/app/homeV2/content/tabs/discovery/sections/insight/Insights.tsx
@@ -11,11 +11,7 @@ import { HorizontalListSkeletons } from '../../../../HorizontalListSkeletons';
import { Section } from '../Section';
import { INSIGHT_CARD_MIN_WIDTH } from './cards/SearchListInsightCard';
import { InsightStatusProvider } from './InsightStatusProvider';
-import { MOST_FREQUENTLY_UPDATED_ID, MostFrequentlyUpdated } from './cards/MostFrequentlyUpdated';
-import { MOST_QUERIED_ID, MostQueriedCard } from './cards/MostQueriedCard';
import { MOST_ROWS_ID, MostRowsCard } from './cards/MostRowsCard';
-import { MOST_USERS_ID, MostUsersCard } from './cards/MostUsersCard';
-import { MOST_VIEWED_DASHBOARDS_ID, MostViewedDashboardsCard } from './cards/MostViewedDashboards';
import { POPULAR_GLOSSARY_TERMS_ID, PopularGlossaryTerms } from './cards/PopularGlossaryTerms';
import { RECENTLY_CREATED_DATASETS_ID, RecentlyCreatedDatasetsCard } from './cards/RecentlyCreatedDatasetsCard';
import { RECENTLY_UPDATED_ID, RecentlyUpdatedDatasetsCard } from './cards/RecentlyUpdatedDatasetsCard';
@@ -30,27 +26,6 @@ type InsightSection = {
};
const ALL_INSIGHTS: InsightSection[] = [
- {
- id: MOST_USERS_ID,
- component: MostUsersCard,
- personas: [
- PersonaType.TECHNICAL_USER,
- PersonaType.DATA_ENGINEER,
- PersonaType.DATA_STEWARD,
- PersonaType.DATA_LEADER,
- ],
- },
- {
- id: MOST_VIEWED_DASHBOARDS_ID,
- component: MostViewedDashboardsCard,
- personas: [
- PersonaType.BUSINESS_USER,
- PersonaType.DATA_STEWARD,
- PersonaType.DATA_LEADER,
- PersonaType.TECHNICAL_USER,
- PersonaType.DATA_ENGINEER,
- ],
- },
{
id: POPULAR_GLOSSARY_TERMS_ID,
component: PopularGlossaryTerms,
@@ -62,27 +37,6 @@ const ALL_INSIGHTS: InsightSection[] = [
PersonaType.BUSINESS_USER,
],
},
- {
- id: MOST_QUERIED_ID,
- component: MostQueriedCard,
- personas: [
- PersonaType.BUSINESS_USER,
- PersonaType.TECHNICAL_USER,
- PersonaType.DATA_ENGINEER,
- PersonaType.DATA_STEWARD,
- PersonaType.DATA_LEADER,
- ],
- },
- {
- id: MOST_FREQUENTLY_UPDATED_ID,
- component: MostFrequentlyUpdated,
- personas: [
- PersonaType.TECHNICAL_USER,
- PersonaType.DATA_ENGINEER,
- PersonaType.DATA_STEWARD,
- PersonaType.DATA_LEADER,
- ],
- },
{
id: RECENTLY_UPDATED_ID,
component: RecentlyUpdatedDatasetsCard,
diff --git a/datahub-web-react/src/app/homeV2/content/tabs/discovery/sections/insight/cards/MostFrequentlyUpdated.tsx b/datahub-web-react/src/app/homeV2/content/tabs/discovery/sections/insight/cards/MostFrequentlyUpdated.tsx
deleted file mode 100644
index 46dbb1323a..0000000000
--- a/datahub-web-react/src/app/homeV2/content/tabs/discovery/sections/insight/cards/MostFrequentlyUpdated.tsx
+++ /dev/null
@@ -1,19 +0,0 @@
-import React from 'react';
-import { buildMostUpdatedFilters, buildMostUpdatedSort } from './useGetMostUpdated';
-import { SearchListInsightCard } from './SearchListInsightCard';
-import { EntityType } from '../../../../../../../../types.generated';
-
-export const MOST_FREQUENTLY_UPDATED_ID = 'MostFrequentlyUpdated';
-
-export const MostFrequentlyUpdated = () => {
- return (
-
- );
-};
diff --git a/datahub-web-react/src/app/homeV2/content/tabs/discovery/sections/insight/cards/MostQueriedCard.tsx b/datahub-web-react/src/app/homeV2/content/tabs/discovery/sections/insight/cards/MostQueriedCard.tsx
deleted file mode 100644
index 621671e181..0000000000
--- a/datahub-web-react/src/app/homeV2/content/tabs/discovery/sections/insight/cards/MostQueriedCard.tsx
+++ /dev/null
@@ -1,19 +0,0 @@
-import React from 'react';
-import { buildMostQueriedFilters, buildMostQueriedSort } from './useGetMostQueried';
-import { SearchListInsightCard } from './SearchListInsightCard';
-import { EntityType } from '../../../../../../../../types.generated';
-
-export const MOST_QUERIED_ID = 'MostQueried';
-
-export const MostQueriedCard = () => {
- return (
-
- );
-};
diff --git a/datahub-web-react/src/app/homeV2/content/tabs/discovery/sections/insight/cards/MostUsersCard.tsx b/datahub-web-react/src/app/homeV2/content/tabs/discovery/sections/insight/cards/MostUsersCard.tsx
deleted file mode 100644
index 5f498ac0a3..0000000000
--- a/datahub-web-react/src/app/homeV2/content/tabs/discovery/sections/insight/cards/MostUsersCard.tsx
+++ /dev/null
@@ -1,19 +0,0 @@
-import React from 'react';
-import { EntityType } from '../../../../../../../../types.generated';
-import { SearchListInsightCard } from './SearchListInsightCard';
-import { buildMostUsersFilters, buildMostUsersSort } from './useGetMostUsers';
-
-export const MOST_USERS_ID = 'MostUsers';
-
-export const MostUsersCard = () => {
- return (
-
- );
-};
diff --git a/datahub-web-react/src/app/homeV2/content/tabs/discovery/sections/insight/cards/MostViewedDashboards.tsx b/datahub-web-react/src/app/homeV2/content/tabs/discovery/sections/insight/cards/MostViewedDashboards.tsx
deleted file mode 100644
index 2f1d1040ac..0000000000
--- a/datahub-web-react/src/app/homeV2/content/tabs/discovery/sections/insight/cards/MostViewedDashboards.tsx
+++ /dev/null
@@ -1,19 +0,0 @@
-import React from 'react';
-import { EntityType } from '../../../../../../../../types.generated';
-import { SearchListInsightCard } from './SearchListInsightCard';
-import { buildMostViewedDashboardsFilter, buildMostViewedDashboardsSort } from './useGetMostViewedDashboards';
-
-export const MOST_VIEWED_DASHBOARDS_ID = 'MostViewedDashboards';
-
-export const MostViewedDashboardsCard = () => {
- return (
-
- );
-};
diff --git a/datahub-web-react/src/app/homeV2/content/tabs/discovery/sections/insight/cards/useGetMostQueried.tsx b/datahub-web-react/src/app/homeV2/content/tabs/discovery/sections/insight/cards/useGetMostQueried.tsx
deleted file mode 100644
index 5e0a1b01f7..0000000000
--- a/datahub-web-react/src/app/homeV2/content/tabs/discovery/sections/insight/cards/useGetMostQueried.tsx
+++ /dev/null
@@ -1,26 +0,0 @@
-import { FilterOperator, SortCriterion, SortOrder } from '../../../../../../../../types.generated';
-import { FilterSet } from '../../../../../../../entityV2/shared/components/styled/search/types';
-import { UnionType } from '../../../../../../../searchV2/utils/constants';
-
-const MIN_QUERIES = '10';
-
-export const buildMostQueriedFilters = (): FilterSet => {
- return {
- unionType: UnionType.AND,
- filters: [
- {
- field: 'usageCountLast30DaysFeature',
- values: [MIN_QUERIES],
- condition: FilterOperator.GreaterThanOrEqualTo,
- negated: false,
- },
- ],
- };
-};
-
-export const buildMostQueriedSort = (): SortCriterion => {
- return {
- field: 'usageCountLast30DaysFeature',
- sortOrder: SortOrder.Descending,
- };
-};
diff --git a/datahub-web-react/src/app/homeV2/content/tabs/discovery/sections/insight/cards/useGetMostUpdated.tsx b/datahub-web-react/src/app/homeV2/content/tabs/discovery/sections/insight/cards/useGetMostUpdated.tsx
deleted file mode 100644
index 597c3611ac..0000000000
--- a/datahub-web-react/src/app/homeV2/content/tabs/discovery/sections/insight/cards/useGetMostUpdated.tsx
+++ /dev/null
@@ -1,26 +0,0 @@
-import { FilterOperator, SortCriterion, SortOrder } from '../../../../../../../../types.generated';
-import { FilterSet } from '../../../../../../../entityV2/shared/components/styled/search/types';
-import { UnionType } from '../../../../../../../searchV2/utils/constants';
-
-const MIN_UPDATES = '10';
-
-export const buildMostUpdatedFilters = (): FilterSet => {
- return {
- unionType: UnionType.AND,
- filters: [
- {
- field: 'writeCountLast30DaysFeature',
- values: [MIN_UPDATES],
- condition: FilterOperator.GreaterThanOrEqualTo,
- negated: false,
- },
- ],
- };
-};
-
-export const buildMostUpdatedSort = (): SortCriterion => {
- return {
- field: 'writeCountLast30DaysFeature',
- sortOrder: SortOrder.Descending,
- };
-};
diff --git a/datahub-web-react/src/app/homeV2/content/tabs/discovery/sections/insight/cards/useGetMostUsers.tsx b/datahub-web-react/src/app/homeV2/content/tabs/discovery/sections/insight/cards/useGetMostUsers.tsx
deleted file mode 100644
index 358f07644e..0000000000
--- a/datahub-web-react/src/app/homeV2/content/tabs/discovery/sections/insight/cards/useGetMostUsers.tsx
+++ /dev/null
@@ -1,26 +0,0 @@
-import { FilterOperator, SortCriterion, SortOrder } from '../../../../../../../../types.generated';
-import { FilterSet } from '../../../../../../../entityV2/shared/components/styled/search/types';
-import { UnionType } from '../../../../../../../searchV2/utils/constants';
-
-const MIN_USERS = '2';
-
-export const buildMostUsersFilters = (): FilterSet => {
- return {
- unionType: UnionType.AND,
- filters: [
- {
- field: 'uniqueUserCountLast30DaysFeature',
- values: [MIN_USERS],
- condition: FilterOperator.GreaterThanOrEqualTo,
- negated: false,
- },
- ],
- };
-};
-
-export const buildMostUsersSort = (): SortCriterion => {
- return {
- field: 'uniqueUserCountLast30DaysFeature',
- sortOrder: SortOrder.Descending,
- };
-};
diff --git a/datahub-web-react/src/app/homeV2/content/tabs/discovery/sections/insight/cards/useGetMostViewedDashboards.tsx b/datahub-web-react/src/app/homeV2/content/tabs/discovery/sections/insight/cards/useGetMostViewedDashboards.tsx
deleted file mode 100644
index 624624ba1d..0000000000
--- a/datahub-web-react/src/app/homeV2/content/tabs/discovery/sections/insight/cards/useGetMostViewedDashboards.tsx
+++ /dev/null
@@ -1,26 +0,0 @@
-import { FilterOperator, SortCriterion, SortOrder } from '../../../../../../../../types.generated';
-import { FilterSet } from '../../../../../../../entityV2/shared/components/styled/search/types';
-import { UnionType } from '../../../../../../../searchV2/utils/constants';
-
-const MIN_QUERIES = '1';
-
-export const buildMostViewedDashboardsFilter = (): FilterSet => {
- return {
- unionType: UnionType.AND,
- filters: [
- {
- field: 'viewCountLast30DaysFeature',
- values: [MIN_QUERIES],
- condition: FilterOperator.GreaterThanOrEqualTo,
- negated: false,
- },
- ],
- };
-};
-
-export const buildMostViewedDashboardsSort = (): SortCriterion => {
- return {
- field: 'viewCountLast30DaysFeature',
- sortOrder: SortOrder.Descending,
- };
-};
diff --git a/datahub-web-react/src/app/searchV2/context/constants.ts b/datahub-web-react/src/app/searchV2/context/constants.ts
index fd873040b7..0f06129b58 100644
--- a/datahub-web-react/src/app/searchV2/context/constants.ts
+++ b/datahub-web-react/src/app/searchV2/context/constants.ts
@@ -24,32 +24,3 @@ export const SORT_OPTIONS = {
sortOrder: SortOrder.Descending,
},
};
-
-// Extensions
-export const ROW_COUNT_FIELD = 'rowCountFeature';
-export const SIZE_IN_BYTES_FIELD = 'sizeInBytesFeature';
-export const QUERY_COUNT = 'queryCountLast30DaysFeature';
-export const UPDATE_COUNT = 'writeCountLast30DaysFeature';
-
-export const DATASET_FEATURES_SORT_OPTIONS = {
- [`${ROW_COUNT_FIELD}_${SortOrder.Descending}`]: {
- label: 'Table Row Count',
- field: ROW_COUNT_FIELD,
- sortOrder: SortOrder.Descending,
- },
- [`${SIZE_IN_BYTES_FIELD}_${SortOrder.Descending}`]: {
- label: 'Table Size (Bytes)',
- field: SIZE_IN_BYTES_FIELD,
- sortOrder: SortOrder.Descending,
- },
- [`${QUERY_COUNT}_${SortOrder.Descending}`]: {
- label: 'Table Query Count (Last 30 Days)',
- field: QUERY_COUNT,
- sortOrder: SortOrder.Descending,
- },
- [`${UPDATE_COUNT}_${SortOrder.Descending}`]: {
- label: 'Table Update Count (Last 30 Days)',
- field: UPDATE_COUNT,
- sortOrder: SortOrder.Descending,
- },
-};