Add json tags to output fields (#269)

output now:
```
{
  "run_page_url": "https://adb-309687753508875.15.azuredatabricks.net/?o=309687753508875#job/1077573342009637/run/19099317",
  "task_outputs": {
    "my_notebook_task": {
      "result": "computed results from notebook."
    }
  }
}%
```
This commit is contained in:
shreyas-goenka 2023-03-21 18:38:11 +01:00 committed by GitHub
parent 75d516939b
commit bfa20cdec9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -13,10 +13,10 @@ import (
type JobOutput struct {
// URL of the job run
RunPageUrl string
RunPageUrl string `json:"run_page_url"`
// output for tasks with a non empty output
TaskOutputs map[string]RunOutput
TaskOutputs map[string]RunOutput `json:"task_outputs"`
}
// TODO: Print the output respecting the execution order (https://github.com/databricks/bricks/issues/259)

View File

@ -11,8 +11,8 @@ type NotebookOutput jobs.NotebookOutput
type DbtOutput jobs.DbtOutput
type SqlOutput jobs.SqlOutput
type LogsOutput struct {
Logs string
LogsTruncated bool
Logs string `json:"logs"`
LogsTruncated bool `json:"logs_truncated"`
}
func structToString(val interface{}) (string, error) {