lance-format / lance-format/lance-data-viewer
feat: add dedicated row count endpoint
Open
@gordonmurray is already working on this.
Since Apr 6, 2026.
enhancement
- Dominant language
- Python
- Stars
- 60
- Forks
- 9
- Avg merge
- 10m
- Merged PRs (30d)
- 4
Description
Currently, getting a row count requires calling /datasets/{name}/rows and reading the total field from the paginated response, which also fetches and serializes actual row data.
A lightweight count endpoint would be useful for health checks, monitoring dashboards, and validation scripts that just need to know how many rows a dataset has.
Proposed implementation:
@app.get("/datasets/{dataset_name}/count")
async def get_dataset_count(dataset_name: str):
validate_dataset_name(dataset_name)
db = get_lance_connection()
table = db.open_table(dataset_name)
return {"dataset": dataset_name, "count": table.count_rows()}
One endpoint, no frontend changes needed.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.