Skip to content

Latest commit

 

History

History
318 lines (265 loc) · 20.7 KB

File metadata and controls

318 lines (265 loc) · 20.7 KB

lance-namespace-apache-client

Lance Namespace Specification

  • API version: 1.0.0

  • Generator version: 7.12.0

This OpenAPI specification is a part of the Lance namespace specification. It contains 2 parts:

The components/schemas, components/responses, components/examples, tags sections define the request and response shape for each operation in a Lance Namespace across all implementations. See https://lancedb.github.io/lance-namespace/spec/operations for more details.

The servers, security, paths, components/parameters sections are for the Lance REST Namespace implementation, which defines a complete REST server that can work with Lance datasets. See https://lancedb.github.io/lance-namespace/spec/impls/rest for more details.

Automatically generated by the OpenAPI Generator

Requirements

Building the API client library requires:

  1. Java 1.8+
  2. Maven/Gradle

Installation

To install the API client library to your local Maven repository, simply execute:

mvn clean install

To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:

mvn clean deploy

Refer to the OSSRH Guide for more information.

Maven users

Add this dependency to your project's POM:

<dependency>
  <groupId>com.lancedb</groupId>
  <artifactId>lance-namespace-apache-client</artifactId>
  <version>0.0.7</version>
  <scope>compile</scope>
</dependency>

Gradle users

Add this dependency to your project's build file:

compile "com.lancedb:lance-namespace-apache-client:0.0.7"

Others

At first generate the JAR by executing:

mvn clean package

Then manually install the following JARs:

  • target/lance-namespace-apache-client-0.0.7.jar
  • target/lib/*.jar

Getting Started

Please follow the installation instruction and execute the following Java code:

import com.lancedb.lance.namespace.client.apache.*;
import com.lancedb.lance.namespace.client.apache.auth.*;
import com.lancedb.lance.namespace.model.*;
import com.lancedb.lance.namespace.client.apache.api.DataApi;

public class DataApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        defaultClient.setBasePath("http://localhost:2333");
        
        DataApi apiInstance = new DataApi(defaultClient);
        String id = "id_example"; // String | `string identifier` of an object in a namespace, following the Lance Namespace spec. When the value is equal to the delimiter, it represents the root namespace. For example, `v1/namespace/./list` performs a `ListNamespace` on the root namespace. 
        AlterTableAddColumnsRequest alterTableAddColumnsRequest = new AlterTableAddColumnsRequest(); // AlterTableAddColumnsRequest | 
        String delimiter = "delimiter_example"; // String | An optional delimiter of the `string identifier`, following the Lance Namespace spec. When not specified, the `.` delimiter must be used. 
        try {
            AlterTableAddColumnsResponse result = apiInstance.alterTableAddColumns(id, alterTableAddColumnsRequest, delimiter);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DataApi#alterTableAddColumns");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}

Documentation for API Endpoints

All URIs are relative to http://localhost:2333

Class Method HTTP request Description
DataApi alterTableAddColumns POST /v1/table/{id}/add_columns Add new columns to table schema
DataApi analyzeTableQueryPlan POST /v1/table/{id}/analyze_plan Analyze query execution plan
DataApi countTableRows POST /v1/table/{id}/count_rows Count rows in a table
DataApi createTable POST /v1/table/{id}/create Create a table with the given name
DataApi deleteFromTable POST /v1/table/{id}/delete Delete rows from a table
DataApi explainTableQueryPlan POST /v1/table/{id}/explain_plan Get query execution plan explanation
DataApi insertIntoTable POST /v1/table/{id}/insert Insert records into a table
DataApi mergeInsertIntoTable POST /v1/table/{id}/merge_insert Merge insert (upsert) records into a table
DataApi queryTable POST /v1/table/{id}/query Query a table
DataApi updateTable POST /v1/table/{id}/update Update rows in a table
IndexApi createTableIndex POST /v1/table/{id}/create_index Create an index on a table
IndexApi describeTableIndexStats POST /v1/table/{id}/index/{index_name}/stats Get table index statistics
IndexApi dropTableIndex POST /v1/table/{id}/index/{index_name}/drop Drop a specific index
IndexApi listTableIndices POST /v1/table/{id}/index/list List indexes on a table
MetadataApi alterTableAlterColumns POST /v1/table/{id}/alter_columns Modify existing columns
MetadataApi alterTableDropColumns POST /v1/table/{id}/drop_columns Remove columns from table
MetadataApi alterTransaction POST /v1/transaction/{id}/alter Alter information of a transaction.
MetadataApi createNamespace POST /v1/namespace/{id}/create Create a new namespace
MetadataApi createTableIndex POST /v1/table/{id}/create_index Create an index on a table
MetadataApi createTableTag POST /v1/table/{id}/tags/create Create a new tag
MetadataApi deleteTableTag POST /v1/table/{id}/tags/delete Delete a tag
MetadataApi deregisterTable POST /v1/table/{id}/deregister Deregister a table
MetadataApi describeNamespace POST /v1/namespace/{id}/describe Describe a namespace
MetadataApi describeTable POST /v1/table/{id}/describe Describe information of a table
MetadataApi describeTableIndexStats POST /v1/table/{id}/index/{index_name}/stats Get table index statistics
MetadataApi describeTransaction POST /v1/transaction/{id}/describe Describe information about a transaction
MetadataApi dropNamespace POST /v1/namespace/{id}/drop Drop a namespace
MetadataApi dropTable POST /v1/table/{id}/drop Drop a table
MetadataApi dropTableIndex POST /v1/table/{id}/index/{index_name}/drop Drop a specific index
MetadataApi getTableStats POST /v1/table/{id}/stats Get table statistics
MetadataApi getTableTagVersion POST /v1/table/{id}/tags/version Get version for a specific tag
MetadataApi listNamespaces GET /v1/namespace/{id}/list List namespaces
MetadataApi listTableIndices POST /v1/table/{id}/index/list List indexes on a table
MetadataApi listTableTags GET /v1/table/{id}/tags/list List all tags for a table
MetadataApi listTableVersions POST /v1/table/{id}/version/list List all versions of a table
MetadataApi listTables GET /v1/namespace/{id}/table/list List tables in a namespace
MetadataApi namespaceExists POST /v1/namespace/{id}/exists Check if a namespace exists
MetadataApi registerTable POST /v1/table/{id}/register Register a table to a namespace
MetadataApi restoreTable POST /v1/table/{id}/restore Restore table to a specific version
MetadataApi tableExists POST /v1/table/{id}/exists Check if a table exists
MetadataApi updateTableTag POST /v1/table/{id}/tags/update Update a tag to point to a different version
NamespaceApi createNamespace POST /v1/namespace/{id}/create Create a new namespace
NamespaceApi describeNamespace POST /v1/namespace/{id}/describe Describe a namespace
NamespaceApi dropNamespace POST /v1/namespace/{id}/drop Drop a namespace
NamespaceApi listNamespaces GET /v1/namespace/{id}/list List namespaces
NamespaceApi listTables GET /v1/namespace/{id}/table/list List tables in a namespace
NamespaceApi namespaceExists POST /v1/namespace/{id}/exists Check if a namespace exists
TableApi alterTableAddColumns POST /v1/table/{id}/add_columns Add new columns to table schema
TableApi alterTableAlterColumns POST /v1/table/{id}/alter_columns Modify existing columns
TableApi alterTableDropColumns POST /v1/table/{id}/drop_columns Remove columns from table
TableApi analyzeTableQueryPlan POST /v1/table/{id}/analyze_plan Analyze query execution plan
TableApi countTableRows POST /v1/table/{id}/count_rows Count rows in a table
TableApi createTable POST /v1/table/{id}/create Create a table with the given name
TableApi createTableIndex POST /v1/table/{id}/create_index Create an index on a table
TableApi createTableTag POST /v1/table/{id}/tags/create Create a new tag
TableApi deleteFromTable POST /v1/table/{id}/delete Delete rows from a table
TableApi deleteTableTag POST /v1/table/{id}/tags/delete Delete a tag
TableApi deregisterTable POST /v1/table/{id}/deregister Deregister a table
TableApi describeTable POST /v1/table/{id}/describe Describe information of a table
TableApi describeTableIndexStats POST /v1/table/{id}/index/{index_name}/stats Get table index statistics
TableApi dropTable POST /v1/table/{id}/drop Drop a table
TableApi dropTableIndex POST /v1/table/{id}/index/{index_name}/drop Drop a specific index
TableApi explainTableQueryPlan POST /v1/table/{id}/explain_plan Get query execution plan explanation
TableApi getTableStats POST /v1/table/{id}/stats Get table statistics
TableApi getTableTagVersion POST /v1/table/{id}/tags/version Get version for a specific tag
TableApi insertIntoTable POST /v1/table/{id}/insert Insert records into a table
TableApi listTableIndices POST /v1/table/{id}/index/list List indexes on a table
TableApi listTableTags GET /v1/table/{id}/tags/list List all tags for a table
TableApi listTableVersions POST /v1/table/{id}/version/list List all versions of a table
TableApi listTables GET /v1/namespace/{id}/table/list List tables in a namespace
TableApi mergeInsertIntoTable POST /v1/table/{id}/merge_insert Merge insert (upsert) records into a table
TableApi queryTable POST /v1/table/{id}/query Query a table
TableApi registerTable POST /v1/table/{id}/register Register a table to a namespace
TableApi restoreTable POST /v1/table/{id}/restore Restore table to a specific version
TableApi tableExists POST /v1/table/{id}/exists Check if a table exists
TableApi updateTable POST /v1/table/{id}/update Update rows in a table
TableApi updateTableTag POST /v1/table/{id}/tags/update Update a tag to point to a different version
TagApi createTableTag POST /v1/table/{id}/tags/create Create a new tag
TagApi deleteTableTag POST /v1/table/{id}/tags/delete Delete a tag
TagApi getTableTagVersion POST /v1/table/{id}/tags/version Get version for a specific tag
TagApi listTableTags GET /v1/table/{id}/tags/list List all tags for a table
TagApi updateTableTag POST /v1/table/{id}/tags/update Update a tag to point to a different version
TransactionApi alterTransaction POST /v1/transaction/{id}/alter Alter information of a transaction.
TransactionApi describeTransaction POST /v1/transaction/{id}/describe Describe information about a transaction

Documentation for Models

Documentation for Authorization

Endpoints do not require authorization.

Recommendation

It's recommended to create an instance of ApiClient per thread in a multithreaded environment to avoid any potential issues.

Author