Databricks icon

Databricks

Interact with Databricks API

Overview

This node integrates with the Databricks Genie API to perform various operations related to conversational AI spaces, conversations, messages, and message queries within Databricks. Specifically, for the Execute Message SQL Query operation under the Genie resource, it triggers the execution of a SQL query attached to a specific message attachment in a conversation within a Genie space.

Typical use cases include:

  • Automating the execution of SQL queries embedded in conversational messages.
  • Retrieving dynamic data results from conversations managed inside Databricks Genie.
  • Integrating conversational AI workflows with data querying capabilities in Databricks.

For example, you might use this node to programmatically execute a SQL query that a user has sent as part of a chat message and then process or route the query results downstream in your workflow.

Properties

Name Meaning
Space ID The unique identifier of the Genie space where the conversation resides.
Conversation ID The unique identifier of the conversation containing the message.
Message ID The unique identifier of the message that holds the SQL query attachment.
Attachment ID The unique identifier of the message attachment which contains the SQL query to execute.

These properties are required inputs to specify exactly which SQL query to execute within the Genie conversational context.

Output

The node outputs a JSON object representing the response from the Genie API after executing the SQL query. This typically includes:

  • Status information about the query execution.
  • Query result metadata.
  • Possibly partial or full query results depending on the API response.

If the query execution returns binary data (e.g., large datasets or files), the node would handle it accordingly, but based on the code, the output is primarily JSON structured data.

Dependencies

  • Requires an API authentication token credential for Databricks to authorize requests.
  • Needs network access to the Databricks workspace hosting the Genie service.
  • The node uses HTTP requests to interact with the Databricks Genie REST API endpoints.

Troubleshooting

  • API Errors: If the API returns errors (e.g., 4xx or 5xx status codes), the node logs detailed error information including status and response data. Common causes include invalid IDs, expired tokens, or insufficient permissions.
  • Network Errors: If no response is received from the server, it indicates connectivity issues or incorrect endpoint URLs.
  • Invalid Parameters: Ensure all required IDs (space, conversation, message, attachment) are correct and correspond to existing entities in Genie.
  • Continue On Fail: If enabled, the node will continue processing subsequent items even if some fail, returning error details in the output JSON.

To resolve errors:

  • Verify all input IDs are accurate.
  • Confirm the API token is valid and has necessary scopes.
  • Check network connectivity to Databricks.
  • Review API documentation for any changes in endpoint requirements.

Links and References


This summary focuses on the Genie - Execute Message SQL Query operation extracted from the provided source code and property definitions.

Discussion