Skip to content

Support opening a single .lance dataset URI #90

Description

@gordonmurray

Summary

The opt-in location flow added by #84 accepts a LanceDB database root and then lists the tables beneath it. It does not open a URI that points directly at one .lance dataset.

For example, this works as a database location:

s3://bucket/path
└── table.lance

But entering the direct dataset URI below connects at the wrong level and produces an empty table list:

s3://bucket/path/table.lance

PR #71 supported the direct form through a separate pylance API, but that branch was superseded by the current connection flow.

Proposed approach

Extend the existing opt-in location flow instead of adding another API surface:

  • Detect when the supplied location identifies a single .lance dataset.
  • Split it into the parent LanceDB location and table name.
  • Open it with the existing lancedb.connect(parent) and table-opening code.
  • Return the identified table as the single /datasets result.
  • Reuse the existing metadata, rows, serialization, error handling, and main/version/tag/branch reference support.
  • Do not add a direct pylance dependency or separate /dataset/* endpoints.
  • Keep the location field opt-in through the existing DATA_PATH= configuration.

Tests

  • Local direct .lance path.
  • Object-store URI parsing without rewriting the scheme.
  • Database-root behavior remains unchanged.
  • Invalid and nonexistent direct locations.
  • Full supported LanceDB version matrix.

An object-store integration smoke test against MinIO for the canonical image would be useful if it can remain lightweight.

Related: #12, #71, #84.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions