lance-format / lance-format/lance-data-viewer

feat: add dedicated row count endpoint

Open
#24 0 comments 0 reactions 1 assignee View on GitHub

@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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.