alibaba / alibaba/DataX

streamwriter配置suffix、header没有生效

Open
#1,854 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
17.4k
Forks
5.7k
PR merge metrics
No merged PRs in 30d

Description

使用如下的json配置将mysql中的数据同步到本地的csv文件中,结果文件不包含后缀、文件内容不包含表头
```{
"job": {
"setting": {
"speed": {
"channel": 4
}
},
"content": [
{
"reader": {
"name": "mysqlreader",
"parameter": {
"username": "root",
"password": "",
"connection": [
{
"jdbcUrl": ["jdbc:mysql://127.0.0.1:3306/test"],
"querySql": ["select a.`a` from a"]
}
]
}
},
"writer": {
"name": "streamwriter",
"parameter": {
"path": "/Users/",
"fileName": "output_file5",
"writeMode": "append",
"fieldDelimiter": ",",
"encoding": "UTF-8",
"dateFormat": "yyyy-MM-dd",
"fileFormat": "csv",
"suffix": ".csv",
"header": ["a"]
}
}
}
]
}
}

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the streamwriter implementation and its handling of the provided suffix and header parameters. Reproduce the MySQL-to-local-CSV configuration from the issue, then verify that the output filename includes .csv and the file begins with the configured a header.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
data-engineering
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.