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 { type JobOutput struct {
// URL of the job run // URL of the job run
RunPageUrl string RunPageUrl string `json:"run_page_url"`
// output for tasks with a non empty output // 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) // 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 DbtOutput jobs.DbtOutput
type SqlOutput jobs.SqlOutput type SqlOutput jobs.SqlOutput
type LogsOutput struct { type LogsOutput struct {
Logs string Logs string `json:"logs"`
LogsTruncated bool LogsTruncated bool `json:"logs_truncated"`
} }
func structToString(val interface{}) (string, error) { func structToString(val interface{}) (string, error) {