MyeoungDev opened a new issue, #11107:
URL: https://github.com/apache/seatunnel/issues/11107

   ### Search before asking
   
   - [x] I had searched in the 
[feature](https://github.com/apache/seatunnel/issues?q=is%3Aissue+label%3A%22Feature%22)
 and found no similar feature requirement.
   
   
   ### Description
   
   SQLTransform currently does not provide built-in Base64 encode/decode 
functions.
   
   Some data integration jobs need to encode or decode column values inside 
SQLTransform before writing to downstream systems.
   
   This issue proposes adding Base64 conversion functions to SQLTransform
   
   - `TO_BASE64(value)`
   - `TO_BASE64(value, charset)`
   - `FROM_BASE64(value)`
   - `FROM_BASE64(value, charset)`
   
   The default charset should be `UTF-8`.
   Users can also other charset.
   
   For `byte[]` input, `TO_BASE64(value)` should encode the raw bytes directly.
   `TO_BASE64(value, charset)` should fail because charset is not meaningful 
for raw bytes.
   
   `FROM_BASE64` should return decoded text as `STRING`.
   
   
   ## Goals
   
   - Add `TO_BASE64(value)` to SQLTransform
   - Add `TO_BASE64(value, charset)` to SQLTransform
   - Add `FROM_BASE64(value)` to SQLTransform
   - Add `FROM_BASE64(value, charset)` to SQLTransform
   - Support `byte[]` input for `TO_BASE64(value)`
   - Use `UTF-8` as the default charset
   - Add unit tests and E2E tests
   - Update SQL function docs
   
   
   ### Usage Scenario
   
   ```sql
     select
       id,
       TO_BASE64(name) as encoded_name,
       FROM_BASE64(encoded_name) as decoded_name
     from source_table
   ```
   
   ### Related issues
   
   _No response_
   
   ### Are you willing to submit a PR?
   
   - [x] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [x] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
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]

Reply via email to