From bfa20cdec9aa03474dd888a5f8cd82d5f81834b6 Mon Sep 17 00:00:00 2001 From: shreyas-goenka <88374338+shreyas-goenka@users.noreply.github.com> Date: Tue, 21 Mar 2023 18:38:11 +0100 Subject: [PATCH] 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." } } }% ``` --- bundle/run/job_output.go | 4 ++-- bundle/run/task_output.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bundle/run/job_output.go b/bundle/run/job_output.go index e359858b..8ab15c82 100644 --- a/bundle/run/job_output.go +++ b/bundle/run/job_output.go @@ -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) diff --git a/bundle/run/task_output.go b/bundle/run/task_output.go index 1e5247bf..34728c36 100644 --- a/bundle/run/task_output.go +++ b/bundle/run/task_output.go @@ -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) {