Skip to content

Commit

Permalink
[Feature] [File Connector]optionrule FILE_FORMAT_TYPE is text/csv ,ad…
Browse files Browse the repository at this point in the history
…d parameter BaseSinkConfig.ENABLE_HEADER_WRITE: apache#5566 (apache#5567)

Co-authored-by: zck <573693104@qq.com>
  • Loading branch information
zck573693104 and zck authored Sep 26, 2023
1 parent a389f69 commit 0e02db7
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,13 @@ public OptionRule optionRule() {
FileFormat.TEXT,
BaseSinkConfig.ROW_DELIMITER,
BaseSinkConfig.FIELD_DELIMITER,
BaseSinkConfig.TXT_COMPRESS)
BaseSinkConfig.TXT_COMPRESS,
BaseSinkConfig.ENABLE_HEADER_WRITE)
.conditional(
BaseSinkConfig.FILE_FORMAT_TYPE,
FileFormat.CSV,
BaseSinkConfig.TXT_COMPRESS)
BaseSinkConfig.TXT_COMPRESS,
BaseSinkConfig.ENABLE_HEADER_WRITE)
.conditional(
BaseSinkConfig.FILE_FORMAT_TYPE,
FileFormat.JSON,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,13 @@ public OptionRule optionRule() {
FileFormat.TEXT,
BaseSinkConfig.ROW_DELIMITER,
BaseSinkConfig.FIELD_DELIMITER,
BaseSinkConfig.TXT_COMPRESS)
BaseSinkConfig.TXT_COMPRESS,
BaseSinkConfig.ENABLE_HEADER_WRITE)
.conditional(
BaseSinkConfig.FILE_FORMAT_TYPE,
FileFormat.CSV,
BaseSinkConfig.TXT_COMPRESS)
BaseSinkConfig.TXT_COMPRESS,
BaseSinkConfig.ENABLE_HEADER_WRITE)
.conditional(
BaseSinkConfig.FILE_FORMAT_TYPE,
FileFormat.JSON,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,13 @@ public OptionRule optionRule() {
FileFormat.TEXT,
BaseSinkConfig.ROW_DELIMITER,
BaseSinkConfig.FIELD_DELIMITER,
BaseSinkConfig.TXT_COMPRESS)
BaseSinkConfig.TXT_COMPRESS,
BaseSinkConfig.ENABLE_HEADER_WRITE)
.conditional(
BaseSinkConfig.FILE_FORMAT_TYPE,
FileFormat.CSV,
BaseSinkConfig.TXT_COMPRESS)
BaseSinkConfig.TXT_COMPRESS,
BaseSinkConfig.ENABLE_HEADER_WRITE)
.conditional(
BaseSinkConfig.FILE_FORMAT_TYPE,
FileFormat.JSON,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,13 @@ public OptionRule optionRule() {
FileFormat.TEXT,
BaseSinkConfig.ROW_DELIMITER,
BaseSinkConfig.FIELD_DELIMITER,
BaseSinkConfig.TXT_COMPRESS)
BaseSinkConfig.TXT_COMPRESS,
BaseSinkConfig.ENABLE_HEADER_WRITE)
.conditional(
BaseSinkConfig.FILE_FORMAT_TYPE,
FileFormat.CSV,
BaseSinkConfig.TXT_COMPRESS)
BaseSinkConfig.TXT_COMPRESS,
BaseSinkConfig.ENABLE_HEADER_WRITE)
.conditional(
BaseSinkConfig.FILE_FORMAT_TYPE,
FileFormat.JSON,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,13 @@ public OptionRule optionRule() {
FileFormat.TEXT,
BaseSinkConfig.ROW_DELIMITER,
BaseSinkConfig.FIELD_DELIMITER,
BaseSinkConfig.TXT_COMPRESS)
BaseSinkConfig.TXT_COMPRESS,
BaseSinkConfig.ENABLE_HEADER_WRITE)
.conditional(
BaseSinkConfig.FILE_FORMAT_TYPE,
FileFormat.CSV,
BaseSinkConfig.TXT_COMPRESS)
BaseSinkConfig.TXT_COMPRESS,
BaseSinkConfig.ENABLE_HEADER_WRITE)
.conditional(
BaseSinkConfig.FILE_FORMAT_TYPE,
FileFormat.JSON,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,13 @@ public OptionRule optionRule() {
FileFormat.TEXT,
BaseSinkConfig.ROW_DELIMITER,
BaseSinkConfig.FIELD_DELIMITER,
BaseSinkConfig.TXT_COMPRESS)
BaseSinkConfig.TXT_COMPRESS,
BaseSinkConfig.ENABLE_HEADER_WRITE)
.conditional(
BaseSinkConfig.FILE_FORMAT_TYPE,
FileFormat.CSV,
BaseSinkConfig.TXT_COMPRESS)
BaseSinkConfig.TXT_COMPRESS,
BaseSinkConfig.ENABLE_HEADER_WRITE)
.conditional(
BaseSinkConfig.FILE_FORMAT_TYPE,
FileFormat.JSON,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,13 @@ public OptionRule optionRule() {
FileFormat.TEXT,
BaseSinkConfig.ROW_DELIMITER,
BaseSinkConfig.FIELD_DELIMITER,
BaseSinkConfig.TXT_COMPRESS)
BaseSinkConfig.TXT_COMPRESS,
BaseSinkConfig.ENABLE_HEADER_WRITE)
.conditional(
BaseSinkConfig.FILE_FORMAT_TYPE,
FileFormat.CSV,
BaseSinkConfig.TXT_COMPRESS)
BaseSinkConfig.TXT_COMPRESS,
BaseSinkConfig.ENABLE_HEADER_WRITE)
.conditional(
BaseSinkConfig.FILE_FORMAT_TYPE,
FileFormat.JSON,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,13 @@ public OptionRule optionRule() {
FileFormat.TEXT,
BaseSinkConfig.ROW_DELIMITER,
BaseSinkConfig.FIELD_DELIMITER,
BaseSinkConfig.TXT_COMPRESS)
BaseSinkConfig.TXT_COMPRESS,
BaseSinkConfig.ENABLE_HEADER_WRITE)
.conditional(
BaseSinkConfig.FILE_FORMAT_TYPE,
FileFormat.CSV,
BaseSinkConfig.TXT_COMPRESS)
BaseSinkConfig.TXT_COMPRESS,
BaseSinkConfig.ENABLE_HEADER_WRITE)
.conditional(
BaseSinkConfig.FILE_FORMAT_TYPE,
FileFormat.JSON,
Expand Down

0 comments on commit 0e02db7

Please sign in to comment.