Skip to content

Retrieving run error after executing a job using WorkspaceClient #375

@ahmadnazeri

Description

@ahmadnazeri

We are using databricks-sdk-go to execute a Python Task Job. And when it fails, we want to retrieve the error.

We used the following code in order to retrieve the output.

// client is a WorkspaceClient
output, err := client.GetRunOutput(ctx, request)

Unfortunately, when we try to retrieve the error message, we get the following error.

"message": "Retrieving the output of runs with multiple tasks is not supported. Please retrieve the output of each individual task run instead."


Currently, the work around that we have in placed is using the Databricks client with API v2.0.

var runOutput jobs.RunOutput
path := "/api/2.0/jobs/runs/get-output"
err = db.errorMessageClient.Do(ctx, http.MethodGet, path, request, &runOutput)
if err != nil {
	return nil, fmt.Errorf("could not get run output: %v", err)
}

Wondering if there is a way to retrieve run output using the WorkspaceClient. If not, would there be support in the future?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions