Skip to main content
This connector is available as a built-in connector on StreamNative Cloud.

Pinecone Sink Connector

This connector allows access to pinecone.io with a pulsar topic. The sink connector takes in messages and writes them if they are in a proper format to a Pinecone index.

Quick start

  1. Pay for a license.
  2. Create an index on pinecone.io
Do one of the following. Either
  • Download the image (from streamnative/pulsar-io-pinecone).
or
  • Run the connector directly on StreamNative Cloud.
And finally
  • Provide the configuration below and start the connector.

Prerequisites

The prerequisites for connecting a Pinecone sink connector to external systems include:
  1. A pinecone.io api key
  2. A index name
  3. A namespace name
See conf/pulsar-io-template.yaml for more information.

1. Create a connector

The following command shows how to use pulsarctl to create a builtin connector. If you want to create a non-builtin connector, you need to replace --sink-type pinecone with --archive /path/to/pulsar-io-pinecone.nar. You can find the button to download the nar package at the beginning of the document.
If you are a StreamNative Cloud user, you need set up your environment first.
The --sink-config is the minimum necessary configuration for starting this connector, and it is a JSON string. You need to substitute the relevant parameters with your own. If you want to configure more parameters, see Configuration Properties for reference.
You can also choose to use a variety of other tools to create a connector:

2. Send messages to the topic

If your connector is created on StreamNative Cloud, you need to authenticate your clients. See Build applications using Pulsar clients for more information.

3. Querying Data From Index

You can look in the query UI from Pinecone or you can run a raw Pinecone query yourself using a client. There are several on the Pinecone website which are listed including Python, Node, and cURL.

Configuration Properties

Before using the Pinecone sink connector, you need to configure it. This table outlines the properties and the descriptions.

Advanced features

Monitoring

Currently we provide several metrics for monitoring.
  • pinecone-upsert-successful
  • pinecone-upsert-failed
  • pinecone-connector-active
  • pinecone-upsert-failed-no-config
  • pinecone-upsert-failed-no-client
  • pinecone-upsert-failed-no-index-connection
  • pinecone-upsert-failed-parsing-error
  • pinecone-upsert-failed-dimension-error
These can all be used to manage the connectors status.

Troubleshooting

If you get a failed upsert problem the most likely candidate is the formatting of your messages. These are required to be in a format like the following.
or the form
Other likely candidates are problems with your connection to Pinecone. Check your configuration values and any exceptions that are ocurring from the connector. Some example commands for debugging locally are as follows. Produce a sample message.
Clear a backlog of messages.
Delete a topic subscription.
Consume a group of messages.
If you need to add a maven shell using jenv you can do this with a helpful script.
And remember if you have maven problems on install that you need to use JDK 8 with this project.

Delivery guarantees

The Pulsar IO connector framework provides three delivery guarantees: at-most-once, at-least-once, and effectively-once. Currently, the Pinecone sink connector provides the at-least-once delivery guarantee.

Examples

With the source connector you can connect to Pinecone with a valid configuration and then write messages to it. An example using localrun is shown below.
This can be used when building the JAR of the project from scratch using mvn clean install. Similar configuration can be setup when using an image mounted with a config file defining environment variables or when using in Kubernetes. This table lists the schema types that currently are supported to be converted.