Skip to content

Commit 1f8c89d

Browse files
authored
Merge pull request #44 from data-integrations/username-colon
PLUGIN-1524 redesign the plugin properties to split up path field
2 parents ced248c + e33e6aa commit 1f8c89d

13 files changed

+1746
-665
lines changed

docs/FTP-batchsource.md renamed to docs/FTPSource-batchsource.md

+25-9
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# FTP Batch Source
22

3-
43
Description
54
-----------
65
Batch source for an FTP or SFTP source. Prefix of the path ('ftp://...' or 'sftp://...') determines the source server
@@ -16,8 +15,17 @@ Properties
1615
----------
1716
**Reference Name:** Name used to uniquely identify this source for lineage, annotating metadata, etc.
1817

19-
**Path:** Path to file(s) to be read. The path uses filename expansion (globbing) to read files.
20-
Path is expected to be of the form prefix://username:password@hostname:port/path
18+
**Server Type:** Whether to read from an FTP or SFTP server
19+
20+
**Host:** Host to read from.
21+
22+
**Port:** Optional port to read from. If no port is given, it will default to 21 for FTP and 22 for SFTP.
23+
24+
**Path:** Path to the file or directory to read from. For example: /path/to/directory.
25+
26+
**User:** User name to use for authentication.
27+
28+
**Password:** Password to use for authentication.
2129

2230
**Format:** Format of the data to read.
2331
The format must be one of 'blob', 'csv', 'delimited', 'json', 'text', 'tsv', or the
@@ -38,20 +46,28 @@ JSON - is not supported. You must manually provide the output schema.
3846

3947
**Delimiter:** Delimiter to use when the format is 'delimited'. This will be ignored for other formats.
4048

41-
**Use First Row as Header:** Whether to use the first line of each file as the column headers. Supported formats are 'text', 'csv', 'tsv', and 'delimited'.
49+
**Use First Row as Header:** Whether to use the first line of each file as the column headers. Supported formats are '
50+
text', 'csv', 'tsv', and 'delimited'.
4251

4352
**Enable Quoted Values** Whether to treat content between quotes as a value. This value will only be used if the format
44-
is 'csv', 'tsv' or 'delimited'. For example, if this is set to true, a line that looks like `1, "a, b, c"` will output two fields.
45-
The first field will have `1` as its value and the second will have `a, b, c` as its value. The quote characters will be trimmed.
53+
is 'csv', 'tsv' or 'delimited'. For example, if this is set to true, a line that looks like `1, "a, b, c"` will output
54+
two fields.
55+
The first field will have `1` as its value and the second will have `a, b, c` as its value. The quote characters will be
56+
trimmed.
4657
The newline delimiter cannot be within quotes.
4758

48-
It also assumes the quotes are well enclosed. The left quote will match the first following quote right before the delimiter. If there is an
59+
It also assumes the quotes are well enclosed. The left quote will match the first following quote right before the
60+
delimiter. If there is an
4961
unenclosed quote, an error will occur.
5062

51-
**Regex Path Filter:** Regex to filter out files in the path. It accepts regular expression which is applied to the complete
63+
**Enable Multiline Support** Enable the support for a single field, enclosed in quotes, to span over multiple lines.
64+
This value will only be used if the format is 'csv', 'tsv' or 'delimited'. The default value is false.
65+
66+
**Regex Path Filter:** Regex to filter out files in the path. It accepts regular expression which is applied to the
67+
complete
5268
path and returns the list of files that match the specified pattern.
5369

5470
**Allow Empty Input:** Identify if path needs to be ignored or not, for case when directory or file does not
5571
exists. If set to true it will treat the not present folder as 0 input and log a warning. Default is false.
5672

57-
**File System Properties:** Additional properties to use with the InputFormat when reading the data.
73+
**File System Properties:** Additional properties to use with the InputFormat when reading the data.
File renamed without changes.

pom.xml

+13-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
<groupId>io.cdap.plugin</groupId>
2323
<artifactId>ftp-plugins</artifactId>
24-
<version>3.3.0-SNAPSHOT</version>
24+
<version>4.0.0-SNAPSHOT</version>
2525

2626
<licenses>
2727
<license>
@@ -216,8 +216,20 @@
216216
<artifactId>slf4j-api</artifactId>
217217
<groupId>org.slf4j</groupId>
218218
</exclusion>
219+
<exclusion>
220+
<groupId>commons-net</groupId>
221+
<artifactId>commons-net</artifactId>
222+
</exclusion>
219223
</exclusions>
220224
</dependency>
225+
<!--This dependency is added to fix design time validations as NoClassDefFoundError was coming for FTPClient class.
226+
It is already part of hadoop-common library. Make sure to upgrade its version whenever hadoop-common library
227+
version got bumped up. -->
228+
<dependency>
229+
<groupId>commons-net</groupId>
230+
<artifactId>commons-net</artifactId>
231+
<version>3.1</version>
232+
</dependency>
221233
<dependency>
222234
<groupId>junit</groupId>
223235
<artifactId>junit</artifactId>
@@ -396,7 +408,6 @@
396408
<includes>
397409
<include>**/*TestSuite.java</include>
398410
<include>**/*Test.java</include>
399-
<exclude>**/*TestRun.java</exclude>
400411
</includes>
401412
<excludes>
402413
<exclude>**/*TestBase.java</exclude>

0 commit comments

Comments
 (0)