[
https://issues.apache.org/jira/browse/NIFI-1568?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15293935#comment-15293935
]
ASF GitHub Bot commented on NIFI-1568:
--------------------------------------
Github user rickysaltzer commented on a diff in the pull request:
https://github.com/apache/nifi/pull/248#discussion_r64087730
--- Diff:
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/UnpackContent.java
---
@@ -111,8 +107,18 @@
.name("Packaging Format")
.description("The Packaging Format used to create the file")
.required(true)
- .allowableValues(AUTO_DETECT_FORMAT, TAR_FORMAT, ZIP_FORMAT,
FLOWFILE_STREAM_FORMAT_V3, FLOWFILE_STREAM_FORMAT_V2, FLOWFILE_TAR_FORMAT)
- .defaultValue(AUTO_DETECT_FORMAT)
+ .allowableValues(PackageFormat.AUTO_DETECT_FORMAT.toString(),
PackageFormat.TAR_FORMAT.toString(),
+ PackageFormat.ZIP_FORMAT.toString(),
PackageFormat.FLOWFILE_STREAM_FORMAT_V3.toString(),
+ PackageFormat.FLOWFILE_STREAM_FORMAT_V2.toString(),
PackageFormat.FLOWFILE_TAR_FORMAT.toString())
+ .defaultValue(PackageFormat.AUTO_DETECT_FORMAT.toString())
+ .build();
+
+ public static final PropertyDescriptor FILE_FILTER = new
PropertyDescriptor.Builder()
+ .name("File Filter")
+ .description("Only files whose names match the given regular
expression will be extracted (tar/zip only)")
+ .required(true)
+ .defaultValue("[^\\.].*")
--- End diff --
@trkurc - I believe it does, I took it from the `GetFile` processor, but it
doesn't really make sense here. I think changing this to just `.*` would make
more sense. I'll do that.
> Allow user to specify file filter regex when unpacking zip/tar archives
> ------------------------------------------------------------------------
>
> Key: NIFI-1568
> URL: https://issues.apache.org/jira/browse/NIFI-1568
> Project: Apache NiFi
> Issue Type: Improvement
> Reporter: Ricky Saltzer
> Assignee: Ricky Saltzer
> Fix For: 0.7.0
>
>
> There are times where you may want to only extract a portion of an archive,
> such as a specific folder, or perhaps a specific file. Similar to how the
> {{GetFile}} processor works, we should provide a property ({{File Filter}})
> which by default extracts all files. The user can modify this property to
> extract only files they wish to process downstream.
>
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)