AbsaOSS / AbsaOSS/pramen

Add an ability to format info date and insert date expression into JDBC SQL queries

オープン
#360 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
DS enhancement Pramen-Scala
主要言語
Scala
スター
31
フォーク
4
平均マージ
1日 10分
マージ済み PR(30日)
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 はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。