Databricks icon

Databricks

Interact with Databricks API

Overview

This node integrates with the Databricks API, specifically supporting multiple resources including Model Serving. For the Model Serving resource, it allows operations such as retrieving logs from a serving endpoint. This is useful for monitoring and debugging machine learning models deployed on Databricks, enabling users to fetch logs related to model inference requests or system events.

A practical example: You have a machine learning model deployed as a serving endpoint in Databricks, and you want to programmatically retrieve its logs to analyze request patterns or troubleshoot errors. Using this node, you can specify the endpoint name and get the relevant logs directly within your workflow.

Properties

Name Meaning
Endpoint Name The name of the serving endpoint whose logs you want to retrieve.

Output

The node outputs JSON data containing the response from the Databricks API for the requested operation. In the case of "Get Serving Endpoint Logs," the output JSON will include log entries or metadata related to the specified serving endpoint.

If the node supports binary data (not shown explicitly for this operation), it would typically represent files or raw data streams, but for this operation, the output is purely JSON-based.

Example output structure (conceptual):

{
  "logs": [
    {
      "timestamp": "2024-01-01T12:00:00Z",
      "level": "INFO",
      "message": "Model inference request received"
    },
    {
      "timestamp": "2024-01-01T12:01:00Z",
      "level": "ERROR",
      "message": "Failed to load model weights"
    }
  ],
  "endpointName": "my-serving-endpoint",
  "status": "success"
}

Dependencies

  • Requires an API authentication token credential for Databricks.
  • Needs the Databricks host URL configured in credentials.
  • The node makes HTTP requests to the Databricks REST API endpoints.
  • No additional external libraries beyond those bundled with n8n are required.

Troubleshooting

  • Common issues:

    • Invalid or missing endpoint name: Ensure the "Endpoint Name" property is correctly set and corresponds to an existing serving endpoint in Databricks.
    • Authentication failures: Verify that the API token and host URL in credentials are correct and have sufficient permissions.
    • Network errors: Check network connectivity to the Databricks instance.
  • Error messages:

    • API Error: <status> <statusText>: Indicates the Databricks API returned an error status code. Review the status and message for details; often caused by invalid parameters or insufficient permissions.
    • Network Error: No response received from server: The node could not reach the Databricks API. Check network settings and firewall rules.
    • Other generic errors will be reported with their message and stack trace if "Continue On Fail" is enabled.

Links and References

Discussion