NganWave opened a new pull request, #12810:
URL: https://github.com/apache/seatunnel/pull/12810
## Description:
Related: #12491
### Background & Problem
Phase-1 (#12491) added support for passing JSON objects and arrays via CLI
-i/--variable, solving the issue of map-typed configs not being dynamically
injectable in Airflow integration. However, inline default values
`${key:defaultValue}` in config files still only support scalars and simple
array; JSON defaults cannot be parsed, forcing users to pass the full JSON via
-i every time.
### Solution
This PR adds a `processPlaceholders()` method in `PlaceholderUtils` to parse
placeholders in config files. It records placeholders in config files by adding
a `defaultConfigMap` variable, and then retrieves the parsed results.
Placeholders with JSON defaults in config files must be wrapped in triple
quotes to keep consistent with CLI behavior, e.g.:
`properties =
"""${mysql_properties:{"connectTimeout":"5000","useSSL":"false"}}"""`
### Note:
As mentioned in Phase-1:
**Reject duplicate placeholders with different default values in config file
to maintain semantic consistency with the CLI duplicate key rejection**
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]