Skip to content

Commit 87a551b

Browse files
committed
Add dashboard sql output in <output> tags
1 parent 937fc09 commit 87a551b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

apps/src/metabase/appController.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,11 @@ export class MetabaseController extends AppController<MetabaseAppState> {
294294
actionContent.content = `<ERROR>${response.error}</ERROR>`;
295295
} else {
296296
const asMarkdown = metabaseToCSV(response.data);
297-
actionContent.content = asMarkdown;
297+
if (!asMarkdown) {
298+
actionContent.content = `<OUTPUT>EMPTY_RESULTS</OUTPUT>`;
299+
} else {
300+
actionContent.content = `<OUTPUT>${asMarkdown}</OUTPUT>`;
301+
}
298302
}
299303
return actionContent;
300304
}

0 commit comments

Comments
 (0)