Skip to content

Commit

Permalink
(improvement)(headless)Add timeFormat to dimension metadata of the …
Browse files Browse the repository at this point in the history
…Text2SQL prompt.

(improvement)(headless)Add `timeFormat` to dimension metadata of the Text2SQL prompt. #1621.
  • Loading branch information
jerryjzhang committed Sep 12, 2024
1 parent ff0833d commit 2fa3bfe
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ public String buildSchemaStr(LLMReq llmReq) {
dimension.getAlias().stream().forEach(a -> alias.append(a + ","));
dimensionStr.append(" ALIAS '" + alias + "'");
}
if (StringUtils.isNotEmpty(dimension.getTimeFormat())) {
dimensionStr.append(" FORMAT '" + dimension.getTimeFormat() + "'");
}
if (StringUtils.isNotEmpty(dimension.getDescription())) {
dimensionStr.append(
" COMMENT '" + dimension.getDescription() + "'");
Expand Down

0 comments on commit 2fa3bfe

Please sign in to comment.