Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
yruslan opened this issue Feb 19, 2024 · 0 comments
Labels
DS enhancement New feature or request Pramen-Scala

Comments

@yruslan
Copy link
Collaborator

yruslan commented Feb 19, 2024

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

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).
@yruslan yruslan added enhancement New feature or request Pramen-Scala DS labels Feb 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DS enhancement New feature or request Pramen-Scala
Projects
None yet
Development

No branches or pull requests

1 participant