diff --git a/ingestion/src/metadata/ingestion/bulksink/elasticsearch.py b/ingestion/src/metadata/ingestion/bulksink/elasticsearch.py index c07ccd020c0..a58eecb7e5f 100644 --- a/ingestion/src/metadata/ingestion/bulksink/elasticsearch.py +++ b/ingestion/src/metadata/ingestion/bulksink/elasticsearch.py @@ -124,8 +124,11 @@ class ElasticsearchBulkSink(BulkSink): column_names=column_names, column_descriptions=column_descriptions, monthly_stats=table.usageSummary.monthlyStats.count, + monthly_percentile_rank=table.usageSummary.monthlyStats.percentileRank, weekly_stats=table.usageSummary.weeklyStats.count, + weekly_percentile_rank=table.usageSummary.weeklyStats.percentileRank, daily_stats=table.usageSummary.dailyStats.count, + daily_percentile_rank=table.usageSummary.dailyStats.percentileRank, tier=tier, tags=list(tags), fqdn=fqdn, diff --git a/ingestion/src/metadata/ingestion/bulksink/elasticsearch_constants.py b/ingestion/src/metadata/ingestion/bulksink/elasticsearch_constants.py index d89b1545fb8..c317b65c7c3 100644 --- a/ingestion/src/metadata/ingestion/bulksink/elasticsearch_constants.py +++ b/ingestion/src/metadata/ingestion/bulksink/elasticsearch_constants.py @@ -79,9 +79,18 @@ TABLE_ELASTICSEARCH_INDEX_MAPPING = textwrap.dedent( "monthly_stats":{ "type": "long" }, + "monthly_percentile_rank":{ + "type": "long" + }, "weekly_stats":{ "type": "long" }, + "weekly_percentile_rank":{ + "type": "long" + }, + "daily_percentile_rank": { + "type": "long" + }, "daily_stats": { "type": "long" } diff --git a/ingestion/src/metadata/ingestion/models/table_metadata.py b/ingestion/src/metadata/ingestion/models/table_metadata.py index c3a4176e0f0..e7a7b6f62d0 100644 --- a/ingestion/src/metadata/ingestion/models/table_metadata.py +++ b/ingestion/src/metadata/ingestion/models/table_metadata.py @@ -179,8 +179,11 @@ class TableESDocument(BaseModel): column_names: List[str] column_descriptions: List[str] monthly_stats: int + monthly_percentile_rank: int weekly_stats: int + weekly_percentile_rank: int daily_stats: int + daily_percentile_rank: int tags: List[str] fqdn: str tier: Optional[str] = None