Skip to content

Get Table Popularity

GET
/api/v1/lineage/popularity
curl --request GET \
--url 'https://example.com/api/v1/lineage/popularity?days_back=30&limit=50'

Get table popularity metrics based on query access patterns.

This endpoint analyzes ACCESS_HISTORY to identify the most frequently accessed tables, helping prioritize lineage analysis and impact assessment.

Args: days_back: Number of days to analyze limit: Maximum number of results to return database: Optional database filter schema: Optional schema filter

Returns: List of table popularity metrics sorted by query count

Raises: HTTPException: If query fails

days_back
Days Back

Days to analyze

integer
default: 30 >= 1 <= 365

Days to analyze

limit
Limit

Maximum results

integer
default: 50 >= 1 <= 500

Maximum results

database
Any of:
string

Filter by database

schema
Any of:
string

Filter by schema

X-Environment-Id
Any of:
string

Successful Response

Media typeapplication/json
Response Get Table Popularity Api V1 Lineage Popularity Get
Array<object>
TablePopularityMetrics

Metrics for table popularity and usage.

object
table_name
required
Table Name

Fully qualified table name

string
query_count
required
Query Count

Number of queries accessing this table

integer
unique_users
required
Unique Users

Number of unique users

integer
last_accessed
Any of:
string format: date-time
avg_queries_per_day
required
Avg Queries Per Day

Average queries per day

number
popularity_score
required
Popularity Score

Calculated popularity score

number
Examplegenerated
[
{
"table_name": "example",
"query_count": 1,
"unique_users": 1,
"last_accessed": "2026-04-15T12:00:00Z",
"avg_queries_per_day": 1,
"popularity_score": 1
}
]

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{
"detail": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
]
}