Skip to content

Commit

Permalink
Added multiline support
Browse files Browse the repository at this point in the history
Added multiline support
  • Loading branch information
vikasrathee-cs committed Jul 20, 2023
1 parent 6a3afe8 commit d4b3531
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@

<properties>
<!-- properties for script build step that creates the config files for the artifacts -->
<data.pipeline.parent>system:cdap-data-pipeline[6.8.0-SNAPSHOT,7.0.0-SNAPSHOT)</data.pipeline.parent>
<data.stream.parent>system:cdap-data-streams[6.8.0-SNAPSHOT,7.0.0-SNAPSHOT)</data.stream.parent>
<data.pipeline.parent>system:cdap-data-pipeline[6.9.2-SNAPSHOT,7.0.0-SNAPSHOT)</data.pipeline.parent>
<data.stream.parent>system:cdap-data-streams[6.9.2-SNAPSHOT,7.0.0-SNAPSHOT)</data.stream.parent>
<cdap.version>6.8.0</cdap.version>
<hydrator.version>2.10.0</hydrator.version>
<hadoop.version>2.3.0</hadoop.version>
Expand Down Expand Up @@ -384,7 +384,8 @@
<version>2.14.1</version>
<configuration>
<argLine>-Xmx3g -Djava.awt.headless=true -XX:MaxPermSize=256m
-XX:+UseConcMarkSweepGC -Djava.net.preferIPv4Stack=true</argLine>
-XX:+UseConcMarkSweepGC -Djava.net.preferIPv4Stack=true
</argLine>
<redirectTestOutputToFile>${surefire.redirectTestOutputToFile}</redirectTestOutputToFile>
<reuseForks>false</reuseForks>
<reportFormat>plain</reportFormat>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,11 @@ public static class FTPBatchSourceConfig extends PluginConfig implements FileSou
"is 'csv', 'tsv' or 'delimited'. The default value is false.")
protected Boolean enableQuotedValues;

@Macro
@Nullable
@Description("Enable the support for a single field, enclosed in quotes, to span over multiple lines. This " +
"value will only be used if the format is 'csv', 'tsv' or 'delimited'. The default value is false.")
protected Boolean enableMultilineSupport;

@VisibleForTesting
FTPBatchSourceConfig() {
Expand Down
27 changes: 27 additions & 0 deletions widgets/FTP-batchsource.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,22 @@
}
}
},
{
"widget-type": "toggle",
"name": "enableMultilineSupport",
"label": "Enable Multiline Support",
"widget-attributes": {
"default": "false",
"on": {
"value": "true",
"label": "True"
},
"off": {
"value": "false",
"label": "False"
}
}
},
{
"widget-type": "toggle",
"name": "skipHeader",
Expand Down Expand Up @@ -179,6 +195,17 @@
}
]
},
{
"name": "enableMultilineSupport",
"condition": {
"expression": "enableQuotedValues == true"
},
"show": [
{
"name": "enableMultilineSupport"
}
]
},
{
"name": "skipHeader",
"condition": {
Expand Down

0 comments on commit d4b3531

Please sign in to comment.