Skip to content

Commit ced248c

Browse files
Merge pull request #43 from cloudsufi/multiline_support
Added multiline support for FTP plugin.
2 parents 6a3afe8 + d4b3531 commit ced248c

File tree

3 files changed

+36
-3
lines changed

3 files changed

+36
-3
lines changed

pom.xml

+4-3
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@
3434

3535
<properties>
3636
<!-- properties for script build step that creates the config files for the artifacts -->
37-
<data.pipeline.parent>system:cdap-data-pipeline[6.8.0-SNAPSHOT,7.0.0-SNAPSHOT)</data.pipeline.parent>
38-
<data.stream.parent>system:cdap-data-streams[6.8.0-SNAPSHOT,7.0.0-SNAPSHOT)</data.stream.parent>
37+
<data.pipeline.parent>system:cdap-data-pipeline[6.9.2-SNAPSHOT,7.0.0-SNAPSHOT)</data.pipeline.parent>
38+
<data.stream.parent>system:cdap-data-streams[6.9.2-SNAPSHOT,7.0.0-SNAPSHOT)</data.stream.parent>
3939
<cdap.version>6.8.0</cdap.version>
4040
<hydrator.version>2.10.0</hydrator.version>
4141
<hadoop.version>2.3.0</hadoop.version>
@@ -384,7 +384,8 @@
384384
<version>2.14.1</version>
385385
<configuration>
386386
<argLine>-Xmx3g -Djava.awt.headless=true -XX:MaxPermSize=256m
387-
-XX:+UseConcMarkSweepGC -Djava.net.preferIPv4Stack=true</argLine>
387+
-XX:+UseConcMarkSweepGC -Djava.net.preferIPv4Stack=true
388+
</argLine>
388389
<redirectTestOutputToFile>${surefire.redirectTestOutputToFile}</redirectTestOutputToFile>
389390
<reuseForks>false</reuseForks>
390391
<reportFormat>plain</reportFormat>

src/main/java/io/cdap/plugin/batch/source/ftp/FTPBatchSource.java

+5
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,11 @@ public static class FTPBatchSourceConfig extends PluginConfig implements FileSou
181181
"is 'csv', 'tsv' or 'delimited'. The default value is false.")
182182
protected Boolean enableQuotedValues;
183183

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

185190
@VisibleForTesting
186191
FTPBatchSourceConfig() {

widgets/FTP-batchsource.json

+27
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,22 @@
8181
}
8282
}
8383
},
84+
{
85+
"widget-type": "toggle",
86+
"name": "enableMultilineSupport",
87+
"label": "Enable Multiline Support",
88+
"widget-attributes": {
89+
"default": "false",
90+
"on": {
91+
"value": "true",
92+
"label": "True"
93+
},
94+
"off": {
95+
"value": "false",
96+
"label": "False"
97+
}
98+
}
99+
},
84100
{
85101
"widget-type": "toggle",
86102
"name": "skipHeader",
@@ -179,6 +195,17 @@
179195
}
180196
]
181197
},
198+
{
199+
"name": "enableMultilineSupport",
200+
"condition": {
201+
"expression": "enableQuotedValues == true"
202+
},
203+
"show": [
204+
{
205+
"name": "enableMultilineSupport"
206+
}
207+
]
208+
},
182209
{
183210
"name": "skipHeader",
184211
"condition": {

0 commit comments

Comments
 (0)