mirror of
https://github.com/lancedb/lancedb.git
synced 2026-11-26 20:44:00 +00:00
A broad documentation pass across the areas LanceDB Enterprise and Embedded diverge on most: **Data Curation** -- GPU Function execution, Slurm scheduling (and what Slurm is, for readers new to it), blob late materialization as its own page, joins, aggregation/profiling, sampling, near-duplicate detection, chunking, distributed shuffle, and IVF-partition clustering. **Feature Engineering** -- computed columns and materialized views, restructured to lead with the Function-based path and show the SQL form side by side with Python throughout; a single Auto Refresh page instead of duplicating scheduling details on every refresh page; adaptive execution; checkpointing; GPU and Slurm placement for refresh workers; a Training Cache page for the PyTorch data loader's automatic cache benefit. **Security & Governance** -- an Audit Log reference (schema, access, grants), Secrets promoted to an ordinary catalog object with their own SQL DDL and a vending/rotation guide, and privilege-table fixes verified against the authorization source. **Deployment & Maintenance** -- Horizontal Scaling and OpenTelemetry moved into a real Deployment area; Automated Cleanup folded into Intelligent Auto-Maintenance (every other maintenance decision already lived there); RTE Compaction and Advanced Conflict Resolution documented in depth. **Landing page** -- the Enterprise feature comparison table reorganized (several redundant or stale rows removed, several new areas added), and the "why Enterprise" bullets replaced with ones tied to a concrete page (Performance, Scale, Fault tolerance, Multicloud deployment, Simplify operations) instead of vague promises. Plus a full pass addressing lancedb-gatekeeper's review: a real test-safety bug (a quickstart test could silently overwrite and delete a deployment's own `frames` table), a fabricated SQL statement with no backing implementation, an actual dedup-guarantee bug in `take_row_ids`, and dozens of documentation-accuracy fixes verified against source rather than taken on faith -- each either fixed, or left with an explicit note on why it needs a feature or deployment owner's sign-off instead of being guessed at. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_018PXMCbRH6i5w47TsjeEUMT --------- Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
75 lines
2.8 KiB
Plaintext
75 lines
2.8 KiB
Plaintext
---
|
|
title: "Attach Database"
|
|
sidebarTitle: "Attach Database"
|
|
description: "Point Enterprise at an existing database in object storage with ATTACH DATABASE, without copying data."
|
|
icon: plug
|
|
keywords: ["attach database", "migrate", "embedded", "object storage", "s3", "gcs", "azure"]
|
|
availability:
|
|
embedded: unavailable
|
|
enterprise: available
|
|
---
|
|
|
|
If your LanceDB Embedded database already lives in object storage --
|
|
Embedded reads and writes tables on S3, GCS or Azure as well as local
|
|
disk -- you can move to Enterprise by attaching that same location,
|
|
rather than copying any data. A database on local disk has no such path:
|
|
`ATTACH DATABASE` only accepts an object-storage URI or a path relative
|
|
to Enterprise's own storage root, never a local filesystem path. Move it
|
|
to object storage first if it is not there already.
|
|
|
|
## Prerequisites {#prerequisites}
|
|
|
|
A [storage integration](/sql/ddl/storage-integration) covering the
|
|
database's location must already exist. `ATTACH DATABASE` never names an
|
|
integration explicitly -- Enterprise automatically binds the most
|
|
specific integration whose `STORAGE_PREFIX` covers the location you
|
|
attach.
|
|
|
|
<CodeGroup>
|
|
```sql SQL icon="database"
|
|
CREATE STORAGE INTEGRATION raw
|
|
STORAGE_PROVIDER = 'S3'
|
|
STORAGE_PREFIX = 's3://customer-data/embedded-db/'
|
|
STORAGE_AWS_ROLE_ARN = 'arn:aws:iam::123456789012:role/lancedb-access'
|
|
```
|
|
</CodeGroup>
|
|
|
|
## Attach the database {#attach}
|
|
|
|
<CodeGroup>
|
|
```sql SQL icon="database"
|
|
ATTACH DATABASE analytics WITH (location = 's3://customer-data/embedded-db/')
|
|
```
|
|
</CodeGroup>
|
|
|
|
See [Database](/sql/ddl/database#attach) for the full `ATTACH DATABASE`
|
|
syntax, including GCS and Azure locations (Azure requires an
|
|
account-qualified URI), `IF NOT EXISTS`, and quoted names.
|
|
|
|
## What changes, and what doesn't {#what-changes}
|
|
|
|
Attaching makes the location a database LanceDB Enterprise manages the
|
|
same way as one it created itself: Enterprise writes its own tracking
|
|
metadata into that location to bring it under management, enabling
|
|
capabilities Embedded never had there -- every table becomes reachable
|
|
through Enterprise's SQL and SDK surface immediately, with Enterprise's
|
|
authorization, Secrets, Functions, and
|
|
[background maintenance](/basics/jobs) now available to
|
|
it. Attaching does not rewrite, move, or re-encode any table's own data.
|
|
|
|
[`DROP DATABASE`](/sql/ddl/database#drop) on an attached database
|
|
unregisters it and releases the storage-integration reference, without
|
|
deleting the underlying data -- the location can be reattached at any
|
|
time.
|
|
|
|
## What to read next {#next}
|
|
|
|
<CardGroup cols={2}>
|
|
<Card title="Storage Integration" icon="cloud" href="/sql/ddl/storage-integration">
|
|
Configure the credential an attach depends on, for S3, GCS, or Azure.
|
|
</Card>
|
|
<Card title="Database" icon="database" href="/sql/ddl/database">
|
|
Full ATTACH, CREATE, DESCRIBE and DROP DATABASE syntax.
|
|
</Card>
|
|
</CardGroup>
|