apache-nifi

Add two columns together using apache-nifi

亡梦爱人 提交于 2019-12-11 14:29:49
问题 I have following scenario. I one database table I have : | id | name | basic_salary | allowance | _______________________________________| | 1 | sach | 2000 | 1000 | | 2 | nala | 5000 | 2500 | |______________________________________| add basic_salary and allowance togther and making it as net_salary and insert to a new table called net_salary For first step, I used ExecuteSQLRecord processor and can get all the records. But problem is : How to add those two columns coming in flowfile. So

how to control retries of invoke HTTP processor in nifi

﹥>﹥吖頭↗ 提交于 2019-12-11 10:38:57
问题 For e.g. invoke HTTP processor, if the retry relationship is connected to itself, how to control the number of retries if 500 related error occurred? I want to control the number of retries up to some count for e.g. 5 and it much retry at certain time. First retry after 1 min and second after 30 min third after 24 hrs like this I want to do. 回答1: There is an open Jira case (NIFI-90) discussing automatic penalization and back-off. In the meantime, if you want to implement your own back-off,

How to use regex to remove the spaces between two rows?

。_饼干妹妹 提交于 2019-12-11 09:32:49
问题 My Input file like this Header1,,,,,,,,,,, c1 , c2 , c3 ,,,, 22-02-2017,1-2,10,,,, 22-02-2017,2-3,11,,,, 22-02-2017,4-6,10,,,, 22-02-2017,5-8,11,,,, I need to regex to achive below expected output: Header1,,,,,,,,,,, c1 , c2 , c3 ,,,, 22-02-2017,1-2,10,,,, 22-02-2017,2-3,11,,,, 22-02-2017,4-6,10,,,, 22-02-2017,5-8,11,,,, I trying this regex for search \s\n in REplaceTExt and replacement value is \n. After Replace text output content like below., Header1,,,,,,,,,,,c1 , c2 , c3 ,,,,22-02-2017,1

nifi: how to change value of json?

筅森魡賤 提交于 2019-12-11 07:32:21
问题 i have processor InvokeHTTP which gives json result. for instance: { "revision" : { "clientId" : "dc572274-4b71-11b6-e415-b91e391bcf4d", "version" : 7 }, "id" : "dc572260-4b71-11b6-0371-f73573ab44fe", "uri" : "http://x.x.x.x:9090/nifi-api/processors/dc572260-4b71-0371-73ab44fe", "position" : { "x" : -1021.9568138214972, "y" : 333.2029958718132 } } i want to change the value of version dynamically for each incoming response of InvokeHTTP. how to achieve this? 回答1: i could suggest ExecuteScript

Apache NiFi: Add column to csv using mapped values

别来无恙 提交于 2019-12-11 07:13:26
问题 A csv is brought into the NiFi Workflow using a GetFile Processor. I have a column consisting of a "id". Each id means a certain string. There are around 3 id's. For an example if my csv consists of name,age,id John,10,Y Jake,55,N Finn,23,C I am aware that Y means York, N means Old and C means Cat. I want a new column with a header named "nick" and have the corresponding nick for each id. name,age,id,nick John,10,Y,York Jake,55,N,Old Finn,23,C,Cat Finally I want a csv with the extra column

How to create Connection and Delete of a processor in apache Nifi using Curl

a 夏天 提交于 2019-12-11 07:06:59
问题 1)Please let me know the process for creating a apache Nifi connection using curl? 2)How to delete a processor using Curl? 3)also Please let me know How to find lastModifier value of a processor. 回答1: 1/ to understand nifi api: https://nifi.apache.org/docs/nifi-docs/rest-api/ 2/ use chrome devtools (f12) / network to trace requests from browser to nifi server, do required actions, and just copy requests as curl. below curls for connection creation and processor deletion. 3/ create connection

Nifi: Threads in nifi

自作多情 提交于 2019-12-11 06:46:48
问题 I want to know how threads work in nifi i mean one processor has one thread or they are in one main thread? perhaps i want to get one file from processor and then i want to update it how can i prevent getting file data by several processor at a time except using keep file =false action? Is it possible to use Thread.sleep inside Execute script processor code? Is it possible to make same logic by groovy? I tried to use java File locks but it doesn't seem to work good here is my code, File file

How to setup Apache NiFi using IIS as proxy

落花浮王杯 提交于 2019-12-11 06:17:09
问题 I have Apache NiFi running on a Windows server. I've setup HTTPS access and connected it to my AD via LDAP for users authentication. The value of property nifi.web.https.host is localhost and nifi.web.https.port is 6444 and I'm able to access the web UI through https://localhost:6444/nifi with no issues. I want now to setup NiFi to run behind IIS on the same server so IIS acts as a proxy. I've created a new site within IIS and configured the URL Rewrite rules in its web.config file as below:

Add header to PostHttp processsor Apache Nifi

笑着哭i 提交于 2019-12-11 06:10:03
问题 Im trying to add a custom header in my post request header in apache nifi, I have seen that in the configuration tab there's Attributes to send as http header (regex) I'm not very familiar with regex, any idea how to add a header and its value like the following : token : READ ? 回答1: PostHttp's "Attributes to Send as HTTP Headers (Regex)" property can accept a regex, but it will work just fine to specify a single attribute name like token . If you had multiple attribute you wanted to name,

PublishJMS processor failing for writing message to IBM Websphere MQ

心已入冬 提交于 2019-12-11 05:54:20
问题 I am facing issue while publishing messages to the IBM Websphere MQ Queue via PublishJMS processor. Configuration of PublishJMS processor & JMS Controller Service, I have verified there is no problem with the MQ connection. I believe there is some additional property I need to set in either the PublishJMS or Controller Service. Below is the error message stack. Caused by: com.ibm.msg.client.jms.DetailedMessageFormatException: JMSCC0051: The property 'JMS_IBM_MsgType' should be set using type