Add an ability to format info date and insert date expression into JDBC SQL queries
未關閉
DS
enhancement
Pramen-Scala
- 主要語言
- Scala
- 星號
- 31
- 分支
- 4
- 平均合併
- 1 天 10 分鐘
- 30 天內合併 PR
- 4
描述
## Background
Users want to customize SQL queries with information date based dates as part of an expression, including table names.
For example:
```
SELECT * FROM my_table_202402
```
where `202402` is `yyyyMM` part of the information date.
## Feature
Add an ability to format info date and insert date expression into JDBC SQL queries .
## Example
```hocon
input.sql = "SELECT * FROM my_table_${formatDate(beginOfMonth(@infoDate), 'yyyyMM)'}"
```
## Proposed Solution
1. Introduce `formatDate()` that can be used like this: `formatDate(@infoDate, 'yyyyMM)'` => `202402`
2. Allow date expressions in SQL queries, for example using `${}` escaping (see the example above).
貢獻指南
這個儲存庫沒有索引到貢獻指南
評估
這個 Issue 還沒有評估資料。