KaiSong-UK opened a new pull request, #18423:
URL: https://github.com/apache/dolphinscheduler/pull/18423
## Bug Description
When using DataX with custom template and resource file, the json field in
task params is empty "{}" and the actual JSON content from the resource file is
never read by the task. This causes DataX to fail with plugin initialization
error.
Issue: #18389
## Root Cause
In DataxTask.buildDataxJsonFile(), when customConfig == YES, the method
directly uses dataXParameters.getJson() which is "{}" (empty object). It never
reads the actual JSON content from the downloaded resource file.
## Fix
When customConfig == YES and esourceList is not empty, read the JSON
content from the downloaded resource file using ResourceContext, matching the
pattern used by SeatunnelTask.
## Changes
- DataxTask.java: Added import for ResourceContext
- DataxTask.java: Modified uildDataxJsonFile() to read resource file
content when resource files are provided alongside custom template mode
## Verification
1. Resource file is downloaded successfully to execution directory
2. Task now reads the resource file content and uses it as the DataX job JSON
3. Falls back to original behavior (using json field) when no resource files
are specified
--
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]