> ## Documentation Index
> Fetch the complete documentation index at: https://docs.maia.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Pinecone Vector Query

export const ComponentMetadata = ({warehouses, unsupportedWarehouses = [], componentType, connectionInputs, connectionOutputs}) => {
  const allWarehouses = [...warehouses.map(w => ({
    name: w,
    supported: true
  })), ...unsupportedWarehouses.map(w => ({
    name: w,
    supported: false
  }))];
  return <div style={{
    background: 'var(--colors-background-light, #f9fafb)',
    border: '1px solid var(--colors-border-default, #e5e7eb)',
    borderRadius: '12px',
    padding: '20px 28px',
    marginBottom: '28px',
    boxShadow: '0 1px 4px rgba(0,0,0,0.10)'
  }}>
      <table style={{
    width: '100%',
    borderCollapse: 'collapse'
  }}>
        <tbody>
          <tr>
            <td style={{
    fontWeight: '600',
    paddingRight: '32px',
    paddingBottom: '14px',
    whiteSpace: 'nowrap',
    verticalAlign: 'middle',
    width: '180px'
  }}>Project Availability</td>
            <td style={{
    paddingBottom: '14px',
    verticalAlign: 'middle'
  }}>
              <div style={{
    display: 'flex',
    flexWrap: 'wrap',
    gap: '8px'
  }}>
                {allWarehouses.map((w, i) => <span key={i} style={{
    background: w.supported ? '#dcfce7' : '#fee2e2',
    color: w.supported ? '#15803d' : '#b91c1c',
    border: `1px solid ${w.supported ? '#bbf7d0' : '#fca5a5'}`,
    borderRadius: '9999px',
    padding: '3px 12px',
    fontSize: '0.85rem',
    fontWeight: '500',
    whiteSpace: 'nowrap'
  }}>
                    {w.name} {w.supported ? '✅' : '❌'}
                  </span>)}
              </div>
            </td>
          </tr>
          <tr>
            <td style={{
    fontWeight: '600',
    paddingRight: '32px',
    paddingBottom: '14px',
    whiteSpace: 'nowrap',
    verticalAlign: 'middle'
  }}>Component Type</td>
            <td style={{
    paddingBottom: '14px',
    verticalAlign: 'middle'
  }}>{componentType}</td>
          </tr>
          <tr>
            <td style={{
    fontWeight: '600',
    paddingRight: '32px',
    paddingBottom: '14px',
    whiteSpace: 'nowrap',
    verticalAlign: 'middle'
  }}>Connection Inputs</td>
            <td style={{
    paddingBottom: '14px',
    verticalAlign: 'middle'
  }}>{connectionInputs}</td>
          </tr>
          <tr>
            <td style={{
    fontWeight: '600',
    paddingRight: '32px',
    whiteSpace: 'nowrap',
    verticalAlign: 'middle'
  }}>Connection Outputs</td>
            <td style={{
    verticalAlign: 'middle'
  }}>{connectionOutputs}</td>
          </tr>
        </tbody>
      </table>
    </div>;
};

<ComponentMetadata warehouses={["Snowflake"]} unsupportedWarehouses={["Databricks", "Amazon Redshift", "BigQuery"]} componentType="Orchestration" connectionInputs="One" connectionOutputs="Unlimited" />

<Info>
  Production use of this feature is available for specific editions only. [Contact our sales team](https://www.matillion.com/contact) for more information.
</Info>

Use the Pinecone Vector Query component to ingest text search strings and return text data *associated* with similar vectors in your Pinecone vector database. The search strings are stored in your cloud data warehouse table.

***

## Video example

<iframe width="560" height="315" src="https://www.youtube.com/embed/BsH7WlJdoFs?si=pj-rL42cW1NGN27j&enablejsapi=1" title="YouTube video player" frameBorder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen" referrerPolicy="strict-origin-when-cross-origin" allowFullScreen />

***

## Properties

<ResponseField name="Name" type="string" required>
  A human-readable name for the component.
</ResponseField>

{/* <!-- param-start:[querySource.snowflake.database] | warehouses: [snowflake] --> */}

<ResponseField name="Database" type="drop-down" required>
  The Snowflake database. The special value `[Environment Default]` uses the database defined in the environment. Read [Databases, Tables and Views - Overview](https://docs.snowflake.com/en/guides-overview-db) to learn more.
</ResponseField>

{/* <!-- param-start:[querySource.snowflake.schema] | warehouses: [snowflake] --> */}

<ResponseField name="Schema" type="drop-down" required>
  The Snowflake schema. The special value `[Environment Default]` uses the schema defined in the environment. Read [Database, Schema, and Share DDL](https://docs.snowflake.com/en/sql-reference/ddl-database.html) to learn more.
</ResponseField>

{/* <!-- param-start:[querySource.snowflake.table] | warehouses: [snowflake] --> */}

<ResponseField name="Table" type="string" required>
  The Snowflake table that holds your source data.
</ResponseField>

{/* <!-- param-start:[querySource.snowflake.keyColumn] | warehouses: [snowflake] --> */}

<ResponseField name="Key Column" type="drop-down" required>
  Set a column as the primary key.
</ResponseField>

{/* <!-- param-start:[querySource.snowflake.queryColumn] | warehouses: [snowflake] --> */}

<ResponseField name="Query Column" type="drop-down" required>
  Set the column from which to load query search strings. The Pinecone Vector Query component will run these query search strings against your Pinecone index and retrieve the raw data that most closely matches each query search string.
</ResponseField>

{/* <!-- param-start:[querySource.snowflake.limit] | warehouses: [snowflake] --> */}

<ResponseField name="Limit" type="integer">
  Set a limit for the number of rows from the table to load. The default is 1000.
</ResponseField>

{/* <!-- param-start:[embeddingGenerator.embeddingProviderType] | warehouses: [snowflake] --> */}

<ResponseField name="Embedding Provider" type="drop-down" required>
  The embedding provider is the API service used to convert the search term into a vector. Choose either OpenAI or Amazon Bedrock. The embedding provider receives a search term (e.g. "How do I log in?") and returns a vector.

  Choose your provider:

  <Tabs>
    <Tab title="OpenAI">
      <ResponseField name="OpenAI API Key" type="drop-down" required>
        Use the drop-down menu to select the corresponding secret definition that denotes the value of your OpenAI API key.

        Read [Secrets and secret definitions](/docs/guides/secrets-and-secret-definitions) to learn how to create a new secret definition.

        To create a new OpenAI API key:

        1. Log in to [OpenAI](https://platform.openai.com/).
        2. Click your avatar in the top-right of the UI.
        3. Click **View API keys**.
        4. Click **+ Create new secret key**.
        5. Give a name for your new secret key and click **Create secret key**.
        6. Copy your new secret key and save it. Then click **Done**.
      </ResponseField>

      {/* <!-- param-start:[embeddingGenerator.openAI.model] | warehouses: [snowflake] --> */}

      <ResponseField name="Embedding Model" type="drop-down" required>
        Select an [embedding model](https://platform.openai.com/docs/guides/embeddings).

        Currently supports:

        * text-embedding-ada-002
        * text-embedding-3-small
        * text-embedding-3-large
      </ResponseField>
    </Tab>

    <Tab title="Amazon Bedrock">
      <ResponseField name="Embedding AWS Region" type="drop-down" required>
        Select your [AWS region](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.RegionsAndAvailabilityZones.html#Concepts.RegionsAndAvailabilityZones.Regions).
      </ResponseField>

      {/* <!-- param-start:[embeddingGenerator.aws.model] | warehouses: [snowflake] --> */}

      <ResponseField name="Embedding Model" type="drop-down" required>
        Select an embedding model.

        Currently supports:

        * [Titan Embeddings G1 - Text](https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters-titan-embed-text.html)
      </ResponseField>
    </Tab>
  </Tabs>
</ResponseField>

{/* <!-- param-start:[embeddingGenerator.embeddingBatchSize] | warehouses: [snowflake] --> */}

<ResponseField name="API Batch Size" type="integer" required>
  Set the [size of array of data per API call](https://platform.openai.com/docs/api-reference/embeddings/create#embeddings-create-input). The default size is 10. When set to 10, 1000 rows would therefore require 100 API calls.

  You may wish to reduce this number if a row contains a high volume of data; and conversely, increase this number for rows with low data volume.
</ResponseField>

{/* <!-- param-start:[pinecone.apiKey] | warehouses: [snowflake] --> */}

<ResponseField name="Pinecone API Key" type="drop-down" required>
  Use the drop-down menu to select the corresponding secret definition that denotes the value of your Pinecone API key.

  Read [Secrets and secret definitions](/docs/guides/secrets-and-secret-definitions) to learn how to create a new secret definition.
</ResponseField>

{/* <!-- param-start:[pinecone.indexName] | warehouses: [snowflake] --> */}

<ResponseField name="Pinecone Index Name" type="drop-down" required>
  The name of the Pinecone vector search index to connect to. The list is generated once you pass a valid Pinecone API key.
</ResponseField>

{/* <!-- param-start:[pinecone.namespace] | warehouses: [snowflake] --> */}

<ResponseField name="Pinecone Namespace" type="string">
  The name of the Pinecone namespace. Pinecone lets you partition records in an index into [namespaces](https://docs.pinecone.io/docs/namespaces). To retrieve a namespace name:

  1. Log in to [Pinecone](https://app.pinecone.io/).
  2. Click **PROJECTS** in the left sidebar.
  3. Click a project tile. This action will open the list of vector search indexes in your project.
  4. Click on your vector search index tile.
  5. Click the **NAMESPACES** tab. Your namespaces will be listed.
</ResponseField>

{/* <!-- param-start:[pinecone.topK] | warehouses: [snowflake] --> */}

<ResponseField name="Top K" type="integer" required>
  The number of results to return from the vector database query. Between 1-100. Default is 3.
</ResponseField>

{/* <!-- param-start:[lookupSource.dataLookupStrategy] | warehouses: [snowflake] --> */}

<ResponseField name="Data Lookup Strategy" type="drop-down" required>
  Select the data lookup strategy. Pinecone only stores the vector associated with text data, and a JSON metadata blob. While the text data *can* be stored in the metadata blob, size limitations can affect coverage—for example when a user has a larger blob of text to be converted to a vector.

  * **Raw data in metadata:** Choosing this option adds an additional property, Data Path, to provide the path to text data within the metadata JSON blob.
  * **Table details in metadata:** Database, schema, table, key column, key, and data column key:value pairs are used in the metadata to look up the text data in your warehouse table. If you have upserted data using [Pinecone Vector Upsert](/docs/components/pinecone-vector-upsert) then the below defaults reflect metadata automatically set via the Pinecone Vector Upsert component.

  To view the metadata of your upserted records:

  1. Log in to [Pinecone](https://app.pinecone.io/).
  2. Click **PROJECTS** in the left sidebar.
  3. Click a project tile. This action will open the list of vector search indexes in your project.
  4. Click on your vector search index tile.
  5. While in the **BROWSER** tab, observe the metadata for a relevant record.
</ResponseField>

{/* <!-- param-start:[lookupSource.tableFromMetadataConfig.snowflakeDatabasePath] | warehouses: [snowflake] --> */}

<ResponseField name="Database Path" type="string" required>
  The value of your database path. By default this is `mtln_database`.
</ResponseField>

{/* <!-- param-start:[lookupSource.tableFromMetadataConfig.snowflakeSchemaPath] | warehouses: [snowflake] --> */}

<ResponseField name="Schema Path" type="string" required>
  The value of your schema path. By default this is `mtln_schema`.
</ResponseField>

{/* <!-- param-start:[lookupSource.tableFromMetadataConfig.tablePath] | warehouses: [snowflake] --> */}

<ResponseField name="Table Path" type="string" required>
  The value of your table path. By default this is `mtln_table`.
</ResponseField>

{/* <!-- param-start:[lookupSource.tableFromMetadataConfig.keyColumnPath] | warehouses: [snowflake] --> */}

<ResponseField name="Key Column Path" type="string" required>
  The value of your key column path. By default this is `mtln_keyColumn`.
</ResponseField>

{/* <!-- param-start:[lookupSource.tableFromMetadataConfig.keyPath] | warehouses: [snowflake] --> */}

<ResponseField name="Key Path" type="string" required>
  The value of your key path. By default this is `mtln_key`.
</ResponseField>

{/* <!-- param-start:[lookupSource.tableFromMetadataConfig.dataColumnPath] | warehouses: [snowflake] --> */}

<ResponseField name="Data Column Path" type="string" required>
  The value of your data column path. By default this is `mtln_dataColumn`.
</ResponseField>

{/* <!-- param-start:[lookupSource.dataFromMetadataConfig.dataPath] | warehouses: [snowflake] --> */}

<ResponseField name="Data Path" type="string" required>
  Set the path to the data in the metadata JSON blob.

  Default is `data`.
</ResponseField>

{/* <!-- param-start:[destination.snowflake.database] | warehouses: [snowflake] --> */}

<ResponseField name="Database" type="drop-down" required>
  The Snowflake *destination* database. The special value `[Environment Default]` uses the database defined in the environment. Read [Databases, Tables and Views - Overview](https://docs.snowflake.com/en/guides-overview-db) to learn more.
</ResponseField>

{/* <!-- param-start:[destination.snowflake.schema] | warehouses: [snowflake] --> */}

<ResponseField name="Schema" type="drop-down" required>
  The Snowflake *destination* schema. The special value `[Environment Default]` uses the schema defined in the environment. Read [Database, Schema, and Share DDL](https://docs.snowflake.com/en/sql-reference/ddl-database.html) to learn more.
</ResponseField>

{/* <!-- param-start:[destination.snowflake.tableName] | warehouses: [snowflake] --> */}

<ResponseField name="Table Name" type="string" required>
  The new Snowflake table to load your prompt output into. Will create a new table if one does not exist. Otherwise, will replace any existing table of the same name.

  This component uses the **CREATE OR REPLACE** clause. When using the **REPLACE** clause, it also applies the **COPY GRANTS** clause. When you clone or create a new object (such as a table, view, schema, or database) from an existing one, the new object doesn't automatically inherit the original's grants (privileges). However, with the **COPY GRANTS** clause, you can seamlessly transfer object-level privileges from the source object to the new one. This helps maintain consistent access control and simplifies permission management when cloning or recreating objects. For more information, read [Snowflake COPY GRANTS](https://docs.snowflake.com/en/sql-reference/sql/create-table#label-create-table-copy-grants).
</ResponseField>
