mirror of
https://github.com/alibaba/DataX.git
synced 2025-05-02 15:12:22 +08:00
don't set the columns header with json format
This commit is contained in:
parent
fa4505775d
commit
1e57429883
@ -137,7 +137,7 @@ public class StarRocksStreamLoadVisitor {
|
|||||||
try (CloseableHttpClient httpclient = httpClientBuilder.build()) {
|
try (CloseableHttpClient httpclient = httpClientBuilder.build()) {
|
||||||
HttpPut httpPut = new HttpPut(loadUrl);
|
HttpPut httpPut = new HttpPut(loadUrl);
|
||||||
List<String> cols = writerOptions.getColumns();
|
List<String> cols = writerOptions.getColumns();
|
||||||
if (null != cols && !cols.isEmpty()) {
|
if (null != cols && !cols.isEmpty() && StarRocksWriterOptions.StreamLoadFormat.CSV.equals(writerOptions.getStreamLoadFormat())) {
|
||||||
httpPut.setHeader("columns", String.join(",", cols.stream().map(f -> String.format("`%s`", f)).collect(Collectors.toList())));
|
httpPut.setHeader("columns", String.join(",", cols.stream().map(f -> String.format("`%s`", f)).collect(Collectors.toList())));
|
||||||
}
|
}
|
||||||
if (null != writerOptions.getLoadProps()) {
|
if (null != writerOptions.getLoadProps()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user