Databricks icon

Databricks

Interact with Databricks API

Overview

The "Upsert Data" operation in the Vector Search resource allows users to insert or update data within a specified vector search index on Databricks. This operation is useful for managing and maintaining vector-based search indexes, which are commonly used in applications involving similarity search, recommendation systems, or semantic search over large datasets.

Practical examples include:

  • Adding new documents or embeddings to an existing vector index.
  • Updating existing entries in the vector index with fresh or corrected data.
  • Maintaining an up-to-date vector search index that powers AI-driven search features in applications.

Properties

Name Meaning
Index Name The name of the vector search index where the data will be upserted.
Data The JSON-formatted data to be inserted or updated in the vector search index.

Output

The node outputs a JSON object representing the response from the Databricks API after attempting to upsert the data into the vector search index. This typically includes confirmation of success or details about the upserted data.

If the operation encounters errors, the output JSON may contain error messages and details describing what went wrong.

No binary data output is involved in this operation.

Dependencies

  • Requires an API authentication token credential configured in n8n to authenticate requests against the Databricks API.
  • The node uses the base URL and authorization token from the provided credentials to communicate with the Databricks service.
  • Proper permissions on the Databricks workspace and vector search index are necessary to perform upsert operations.

Troubleshooting

  • Common Issues:

    • Incorrect or missing index name can cause the API to reject the request.
    • Malformed JSON data in the "Data" property may lead to parsing errors.
    • Insufficient permissions or invalid API tokens will result in authorization errors.
    • Network connectivity issues can prevent successful communication with the Databricks API.
  • Error Messages:

    • API Error: <status> <statusText>: Indicates the Databricks API returned an error status. Check the status code and message for details (e.g., 401 Unauthorized means invalid credentials).
    • Network Error: No response received from server: Suggests network problems or incorrect endpoint configuration.
    • Other error messages will be passed through if the node is set to continue on failure, otherwise they will stop execution.

To resolve these errors:

  • Verify the index name and data format.
  • Ensure the API token is valid and has required scopes.
  • Check network connectivity and endpoint URLs.
  • Enable detailed logging to inspect request and response payloads.

Links and References

Discussion