You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by ex...@apache.org on 2024/01/19 01:00:29 UTC

(nifi) branch main updated (74fdd1cf98 -> 2212afe482)

This is an automated email from the ASF dual-hosted git repository.

exceptionfactory pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/nifi.git


    from 74fdd1cf98 NIFI-12631 Upgraded Apache MINA SSHD from 2.11.0 to 2.12.0
     new ddec0dff5a NIFI-12635 Upgraded Slack client from 1.36.1 to 1.37.0
     new bf1dfd0615 NIFI-12637 Handle migrating Proxy properties for InvokeHTTP
     new 2212afe482 NIFI-12638 Add Use Case on how to use QueryRecord as a router

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../nifi-slack-bundle/nifi-slack-processors/pom.xml   |  2 +-
 .../apache/nifi/processors/standard/InvokeHTTP.java   | 14 ++++++++++++++
 .../apache/nifi/processors/standard/QueryRecord.java  | 19 +++++++++++++++++++
 3 files changed, 34 insertions(+), 1 deletion(-)


(nifi) 03/03: NIFI-12638 Add Use Case on how to use QueryRecord as a router

Posted by ex...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

exceptionfactory pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi.git

commit 2212afe482d6fb4458347214910dbb267ff37cb0
Author: Mark Payne <ma...@hotmail.com>
AuthorDate: Thu Jan 18 17:17:34 2024 -0500

    NIFI-12638 Add Use Case on how to use QueryRecord as a router
    
    This closes #8271
    
    Signed-off-by: David Handermann <ex...@apache.org>
---
 .../apache/nifi/processors/standard/QueryRecord.java  | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/QueryRecord.java b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/QueryRecord.java
index 21bf3372eb..bbbadf220c 100644
--- a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/QueryRecord.java
+++ b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/QueryRecord.java
@@ -169,6 +169,25 @@ import static org.apache.nifi.util.db.JdbcProperties.DEFAULT_SCALE;
         should be connected to the next Processor in our flow.
         """
 )
+@UseCase(
+    description = "Route record-oriented data for processing based on its contents",
+    keywords = {"record", "route", "conditional processing", "field"},
+    configuration = """
+        "Record Reader" should be set to a Record Reader that is appropriate for your data.
+        "Record Writer" should be set to a Record Writer that writes out data in the desired format.
+
+        For each route that you want to create, add a new property.
+        The name of the property should be a short description of the data that should be selected for the route.
+        Its value is a SQL statement that selects all columns from a table named `FLOW_FILE`. The WHERE clause selects the data that should be included in the route.
+        It is recommended to always quote column names using double-quotes in order to avoid conflicts with SQL keywords.
+
+        A new outbound relationship is created for each property that is added. The name of the relationship is the same as the property name.
+
+        For example, to route data based on whether or not it is a large transaction, we would add two properties:
+        `small transaction` would have a value such as `SELECT * FROM FLOWFILE WHERE transactionTotal < 100`
+        `large transaction` would have a value of `SELECT * FROM FLOWFILE WHERE transactionTotal >= 100`
+        """
+)
 public class QueryRecord extends AbstractProcessor {
 
     public static final String ROUTE_ATTRIBUTE_KEY = "QueryRecord.Route";


(nifi) 02/03: NIFI-12637 Handle migrating Proxy properties for InvokeHTTP

Posted by ex...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

exceptionfactory pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi.git

commit bf1dfd0615a8c1eb2f8b90480c8a70ca3b86cba4
Author: Mark Payne <ma...@hotmail.com>
AuthorDate: Thu Jan 18 17:08:38 2024 -0500

    NIFI-12637 Handle migrating Proxy properties for InvokeHTTP
    
    This closes #8270
    
    Signed-off-by: David Handermann <ex...@apache.org>
---
 .../org/apache/nifi/processors/standard/InvokeHTTP.java    | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/InvokeHTTP.java b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/InvokeHTTP.java
index fc378e0ce8..1c477d319b 100644
--- a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/InvokeHTTP.java
+++ b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/InvokeHTTP.java
@@ -597,6 +597,20 @@ public class InvokeHTTP extends AbstractProcessor {
 
     @Override
     public void migrateProperties(final PropertyConfiguration config) {
+        if (config.isPropertySet("Proxy Host")) {
+            final Map<String, String> serviceProperties = new HashMap<>();
+            serviceProperties.put("proxy-type", config.getRawPropertyValue("Proxy Type").map(String::toUpperCase).orElse(null));
+            serviceProperties.put("proxy-server-host", config.getRawPropertyValue("Proxy Host").orElse(null));
+            serviceProperties.put("proxy-server-port", config.getRawPropertyValue("Proxy Port").orElse(null));
+            serviceProperties.put("proxy-user-name", config.getRawPropertyValue("invokehttp-proxy-user").orElse(null));
+            serviceProperties.put("proxy-user-password", config.getRawPropertyValue("invokehttp-proxy-password").orElse(null));
+
+            final String serviceId = config.createControllerService("org.apache.nifi.proxy.StandardProxyConfigurationService", serviceProperties);
+            config.setProperty(PROXY_CONFIGURATION_SERVICE, serviceId);
+        } else {
+            config.removeProperty("Proxy Type");
+        }
+
         config.renameProperty("Read Timeout", SOCKET_READ_TIMEOUT.getName());
         config.renameProperty("Remote URL", HTTP_URL.getName());
         config.renameProperty("disable-http2", HTTP2_DISABLED.getName());


(nifi) 01/03: NIFI-12635 Upgraded Slack client from 1.36.1 to 1.37.0

Posted by ex...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

exceptionfactory pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi.git

commit ddec0dff5a019dcc51fb8da3a9a191e881da5ac9
Author: Mark Payne <ma...@hotmail.com>
AuthorDate: Thu Jan 18 16:18:07 2024 -0500

    NIFI-12635 Upgraded Slack client from 1.36.1 to 1.37.0
    
    This closes #8269
    
    Signed-off-by: David Handermann <ex...@apache.org>
---
 nifi-nar-bundles/nifi-slack-bundle/nifi-slack-processors/pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/nifi-nar-bundles/nifi-slack-bundle/nifi-slack-processors/pom.xml b/nifi-nar-bundles/nifi-slack-bundle/nifi-slack-processors/pom.xml
index ade667c4b8..5259afed6c 100644
--- a/nifi-nar-bundles/nifi-slack-bundle/nifi-slack-processors/pom.xml
+++ b/nifi-nar-bundles/nifi-slack-bundle/nifi-slack-processors/pom.xml
@@ -34,7 +34,7 @@
         <dependency>
             <groupId>com.slack.api</groupId>
             <artifactId>bolt-socket-mode</artifactId>
-            <version>1.36.1</version>
+            <version>1.37.0</version>
         </dependency>
         <!-- Required by bolt-socket-mode but the library itself doesn't have the dependency. -->
         <dependency>