## Create Data Sink `DataSink dataSinks().create(DataSinkCreateParamsparams, RequestOptionsrequestOptions = RequestOptions.none())` **post** `/api/v1/data-sinks` Create a new data sink. ### Parameters - `DataSinkCreateParams params` - `Optional organizationId` - `Optional projectId` - `DataSinkCreate dataSinkCreate` Schema for creating a data sink. ### Returns - `class DataSink:` Schema for a data sink. - `String id` Unique identifier - `Component component` Component that implements the data sink - `class UnionMember0:` - `class CloudPineconeVectorStore:` Cloud Pinecone Vector Store. This class is used to store the configuration for a Pinecone vector store, so that it can be created and used in LlamaCloud. Args: api_key (str): API key for authenticating with Pinecone index_name (str): name of the Pinecone index namespace (optional[str]): namespace to use in the Pinecone index insert_kwargs (optional[dict]): additional kwargs to pass during insertion - `String apiKey` The API key for authenticating with Pinecone - `String indexName` - `Optional className` - `Optional insertKwargs` - `Optional namespace` - `Optional supportsNestedMetadataFilters` - `TRUE(true)` - `class CloudPostgresVectorStore:` - `String database` - `long embedDim` - `String host` - `String password` - `long port` - `String schemaName` - `String tableName` - `String user` - `Optional className` - `Optional hnswSettings` HNSW settings for PGVector. - `Optional distanceMethod` The distance method to use. - `L2("l2")` - `IP("ip")` - `COSINE("cosine")` - `L1("l1")` - `HAMMING("hamming")` - `JACCARD("jaccard")` - `Optional efConstruction` The number of edges to use during the construction phase. - `Optional efSearch` The number of edges to use during the search phase. - `Optional m` The number of bi-directional links created for each new element. - `Optional vectorType` The type of vector to use. - `VECTOR("vector")` - `HALF_VEC("half_vec")` - `BIT("bit")` - `SPARSE_VEC("sparse_vec")` - `Optional hybridSearch` - `Optional performSetup` - `Optional supportsNestedMetadataFilters` - `class CloudQdrantVectorStore:` Cloud Qdrant Vector Store. This class is used to store the configuration for a Qdrant vector store, so that it can be created and used in LlamaCloud. Args: collection_name (str): name of the Qdrant collection url (str): url of the Qdrant instance api_key (str): API key for authenticating with Qdrant max_retries (int): maximum number of retries in case of a failure. Defaults to 3 client_kwargs (dict): additional kwargs to pass to the Qdrant client - `String apiKey` - `String collectionName` - `String url` - `Optional className` - `Optional clientKwargs` - `Optional maxRetries` - `Optional supportsNestedMetadataFilters` - `TRUE(true)` - `class CloudAzureAiSearchVectorStore:` Cloud Azure AI Search Vector Store. - `String searchServiceApiKey` - `String searchServiceEndpoint` - `Optional className` - `Optional clientId` - `Optional clientSecret` - `Optional embeddingDimension` - `Optional filterableMetadataFieldKeys` - `Optional indexName` - `Optional searchServiceApiVersion` - `Optional supportsNestedMetadataFilters` - `TRUE(true)` - `Optional tenantId` - `class CloudMongoDBAtlasVectorSearch:` Cloud MongoDB Atlas Vector Store. This class is used to store the configuration for a MongoDB Atlas vector store, so that it can be created and used in LlamaCloud. Args: mongodb_uri (str): URI for connecting to MongoDB Atlas db_name (str): name of the MongoDB database collection_name (str): name of the MongoDB collection vector_index_name (str): name of the MongoDB Atlas vector index fulltext_index_name (str): name of the MongoDB Atlas full-text index - `String collectionName` - `String dbName` - `String mongoDBUri` - `Optional className` - `Optional embeddingDimension` - `Optional fulltextIndexName` - `Optional supportsNestedMetadataFilters` - `Optional vectorIndexName` - `class CloudMilvusVectorStore:` Cloud Milvus Vector Store. - `String uri` - `Optional token` - `Optional className` - `Optional collectionName` - `Optional embeddingDimension` - `Optional supportsNestedMetadataFilters` - `class CloudAstraDbVectorStore:` Cloud AstraDB Vector Store. This class is used to store the configuration for an AstraDB vector store, so that it can be created and used in LlamaCloud. Args: token (str): The Astra DB Application Token to use. api_endpoint (str): The Astra DB JSON API endpoint for your database. collection_name (str): Collection name to use. If not existing, it will be created. embedding_dimension (int): Length of the embedding vectors in use. keyspace (optional[str]): The keyspace to use. If not provided, 'default_keyspace' - `String token` The Astra DB Application Token to use - `String apiEndpoint` The Astra DB JSON API endpoint for your database - `String collectionName` Collection name to use. If not existing, it will be created - `long embeddingDimension` Length of the embedding vectors in use - `Optional className` - `Optional keyspace` The keyspace to use. If not provided, 'default_keyspace' - `Optional supportsNestedMetadataFilters` - `TRUE(true)` - `String name` The name of the data sink. - `String projectId` - `SinkType sinkType` - `PINECONE("PINECONE")` - `POSTGRES("POSTGRES")` - `QDRANT("QDRANT")` - `AZUREAI_SEARCH("AZUREAI_SEARCH")` - `MONGODB_ATLAS("MONGODB_ATLAS")` - `MILVUS("MILVUS")` - `ASTRA_DB("ASTRA_DB")` - `Optional createdAt` Creation datetime - `Optional updatedAt` Update datetime ### Example ```java package com.llamacloud_prod.api.example; import com.llamacloud_prod.api.client.LlamaCloudClient; import com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient; import com.llamacloud_prod.api.core.JsonValue; import com.llamacloud_prod.api.models.datasinks.DataSink; import com.llamacloud_prod.api.models.datasinks.DataSinkCreateParams; import com.llamacloud_prod.api.models.pipelines.DataSinkCreate; public final class Main { private Main() {} public static void main(String[] args) { LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv(); DataSinkCreate params = DataSinkCreate.builder() .component(DataSinkCreate.Component.UnionMember0.builder() .putAdditionalProperty("foo", JsonValue.from("bar")) .build()) .name("name") .sinkType(DataSinkCreate.SinkType.PINECONE) .build(); DataSink dataSink = client.dataSinks().create(params); } } ``` #### Response ```json { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "component": { "foo": "bar" }, "name": "name", "project_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "sink_type": "PINECONE", "created_at": "2019-12-27T18:11:19.117Z", "updated_at": "2019-12-27T18:11:19.117Z" } ```