mirror of
https://github.com/alibaba/DataX.git
synced 2025-05-02 17:22:15 +08:00
optimize columns with backquotes
This commit is contained in:
parent
4450ccadd8
commit
a3aa8e31eb
@ -26,6 +26,7 @@ import org.slf4j.LoggerFactory;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
|
||||||
public class StarRocksStreamLoadVisitor {
|
public class StarRocksStreamLoadVisitor {
|
||||||
@ -137,7 +138,7 @@ public class StarRocksStreamLoadVisitor {
|
|||||||
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()) {
|
||||||
httpPut.setHeader("columns", String.join(",", cols));
|
httpPut.setHeader("columns", String.join(",", cols.stream().map(f -> String.format("`%s`", f)).collect(Collectors.toList())));
|
||||||
}
|
}
|
||||||
if (null != writerOptions.getLoadProps()) {
|
if (null != writerOptions.getLoadProps()) {
|
||||||
for (Map.Entry<String, Object> entry : writerOptions.getLoadProps().entrySet()) {
|
for (Map.Entry<String, Object> entry : writerOptions.getLoadProps().entrySet()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user