Hi Ferenc,

Looks like a good idea.

I'd prefer sticking to the SQL standard if possible.  Would it be possible
/ sensible to allow for each syntax, perhaps managed by a config setting?

Cheers,

Jim

On Tue, Mar 26, 2024 at 6:59 AM Ferenc Csaky <ferenc.cs...@pm.me.invalid>
wrote:

> Hello devs,
>
> I would like to start a discussion about FLIP-XXX: Introduce Flink SQL
> variables [1].
>
> The main motivation behing this change is to be able to abstract Flink SQL
> from
> environment-specific configuration and provide a way to carry jobs between
> environments (e.g. dev-stage-prod) without the need to make changes in the
> code.
> It can also be a way to decouple sensitive information from the job code,
> or help
> with redundant literals.
>
> The main decision regarding the proposed solution is to handle the
> variable resolution
> as early as possible on the given string statement, so the whole operation
> is an easy and
> lightweight string replace. But this approach introduces some limitations
> as well:
>
> - The executed SQL will always be the unresolved, raw string, so in case
> of secrets
> a DESC operation would show them.
> - Changing the value of a variable can break code that uses that variable.
>
> For more details, please check the FLIP [1]. There is also a stale Jira
> about this [2].
>
> Looking forward to any comments and opinions!
>
> Thanks,
> Ferenc
>
> [1]
> https://docs.google.com/document/d/1-eUz-PBCdqNggG_irDT0X7fdL61ysuHOaWnrkZHb5Hc/edit?usp=sharing
> [2] https://issues.apache.org/jira/browse/FLINK-17377

Reply via email to