public class LanceDbNamespaceClientBuilder extends Object
LanceNamespace for LanceDB.
For LanceDB Cloud, use the simplified builder API:
import org.lance.namespace.LanceNamespace;
// If your DB url is db://example-db, then your database here is example-db
LanceNamespace namespaceClient = LanceDbNamespaceClientBuilder.newBuilder()
.apiKey("your_lancedb_cloud_api_key")
.database("your_database_name")
.build();
For LanceDB Enterprise deployments, use your custom endpoint:
LanceNamespace namespaceClient = LanceDbNamespaceClientBuilder.newBuilder()
.apiKey("your_lancedb_enterprise_api_key")
.database("your_database_name")
.endpoint("<your_enterprise_endpoint>")
.build();
| Modifier and Type | Method and Description |
|---|---|
LanceDbNamespaceClientBuilder |
apiKey(String apiKey)
Set the API key (required).
|
org.lance.namespace.LanceNamespace |
build()
Build the LanceNamespace instance.
|
LanceDbNamespaceClientBuilder |
config(String key,
String value)
Add additional configuration parameters.
|
LanceDbNamespaceClientBuilder |
database(String database)
Set the database name (required).
|
LanceDbNamespaceClientBuilder |
endpoint(String endpoint)
Set a custom endpoint URL (optional).
|
static LanceDbNamespaceClientBuilder |
newBuilder()
Create a new builder instance.
|
LanceDbNamespaceClientBuilder |
region(String region)
Set the region for LanceDB Cloud (optional).
|
public static LanceDbNamespaceClientBuilder newBuilder()
public LanceDbNamespaceClientBuilder apiKey(String apiKey)
apiKey - The LanceDB API keypublic LanceDbNamespaceClientBuilder database(String database)
database - The database namepublic LanceDbNamespaceClientBuilder endpoint(String endpoint)
endpoint - The complete base URL for your LanceDB Enterprise deploymentpublic LanceDbNamespaceClientBuilder region(String region)
region - The AWS region (e.g., "us-east-1", "eu-west-1")public LanceDbNamespaceClientBuilder config(String key, String value)
key - The configuration keyvalue - The configuration valuepublic org.lance.namespace.LanceNamespace build()
IllegalStateException - if required parameters are missingCopyright © 2025. All rights reserved.