apache-nifi

NiFi 1.10 Parameters: How to get them to work?

末鹿安然 提交于 2019-12-13 03:38:02
问题 We are running NiFi 1.10 and have defined a Parameter Context. This has been assigned to a Processor Group, and a ListFTP processor has been added to our flow. In the parameter context, there is a parameter called ftp.password, which is set as a sensitive parameter and the password as its value. Then in the ListFTP processor, this parameter is referenced by #{ftp.password}. However, it does not seems to work as it seems to be unable to resolve the parameter. It fails to login to the FTP

Unable to refer python libraries from Nifi ExecuteScript processor

三世轮回 提交于 2019-12-13 03:03:14
问题 I have been trying to run a python script in NiFi's ExecuteScript processor. Though the catch here is that I don't have server file location access and all the python libraries are installed at "/data/jython", "/data/jython/Lib/site-packages/" and "data/nltk" Below is the import section of my python script: import json, traceback, pycountry, requests, geocoder, re, sys, nltk from nltk.sentiment.vader import SentimentIntensityAnalyzer from nltk.corpus import stopwords from java.nio.charset

Column is of type timestamp without time zone but expression is of type character varying : Nifi

落花浮王杯 提交于 2019-12-12 20:32:10
问题 I am trying to insert CSV records to Postgres database using nifi. Sample csv file : timenow,location '2019-10-21 15:13:11','colombo' When nifi scenario runs, it gives following error Error column 'timenow' is of type timestamp without time zone but expression is of type character varying If I use normal insert into conditions (timenow,location) values ('2019-10-21 15:13:11','colombo'); No errors values inserted to table. Do I have to change nifi configurations to add this to table? I have

Do Apache NiFi's InvokeHTTP and other HTTP processors send an Authorization header to redirected URLs?

我的未来我决定 提交于 2019-12-12 18:43:09
问题 If I have configured a property Authorization with a bearer token, will InvokeHTTP send that header to the redirected URL? I can't find anything in the documentation about it. I also can't seem to find clarity in the source of OkHttp, the underlying library for InvokeHTTP. Is there a way to strip a header from a redirected URL based on the URL? I may quickly be getting into "use ExecuteGroovyScript" territory here. 回答1: The short answer is no, because OkHttp strips Authorization on redirects:

Update csv value using executescript processor fails in apache-nifi using groovy

别来无恙 提交于 2019-12-12 18:14:44
问题 This question is related to this SO question Above solution solved my problem, Now I tried to connect this into a flow coming from QueryRecord processor. Here this QueryRecord divide my flowfile into two streams. Lets say customers and suppliers . And ExecuteGroovyScript is used to add ORDER and COMPLAINT . Sample csv : id,record_type 1,0 2,0 3,1 So result should be : id,record_type 1,ORDER 2,ORDER 3,COMPLAINT Actual result just placed default 'IGNORE' value. QueryRecord configurations

Is there a way to change the Delivery Mode in PublishJMS processor in Nifi?

烂漫一生 提交于 2019-12-12 16:34:17
问题 ​I am sending messages to IBM MQ using Nifi PublishJMS processor. The Messages have Persistence = Persistent in MQ. I want to change it to Non-Persistent. Is there a property in Nifi PublishJms processor to correct this? Or is it done from the MQ side. I don't have access to MQ servers, I can only check the messages being delivered to the queue. 回答1: At a low level a MQ client applications can specify the following persistence values: MQPER_PERSISTENCE_AS_PARENT (Use the value of the next

Understand the Notify and Wait process in NIFI in my flow

故事扮演 提交于 2019-12-12 11:10:40
问题 I am new to the NIFI process where in my current job, I have notify and wait process. could someone help me to understand this flow On what basis the Notify work. in my case we have 4 schema files process and 4 data files with respective those. the below details are notify properties.. Below are the Wait properties: ***I understand that, the wait process looking for 8 Signal to proceed to process the next level of process. but technically how this will woks not sure. Please it will be much

How do I view the consumed messages of Kafka in Nifi?

十年热恋 提交于 2019-12-12 10:21:55
问题 I have started a Nifi process(Consume Kafka) and connected it to a topic. It is running but I am not able to (don't know) where can I view the messages? 回答1: ConsumeKafka processor runs and generates flowfile for each message. Only when you connect a processor to other components like another processor or an output port, will you be able to visualize the data being moved through. For starters you can try this: Connect ConsumeKafka with LogAttribute or any other processor for that matter. Stop

Custom processor + DBCPConnectionPool for SQL Server : driver jar not loaded

巧了我就是萌 提交于 2019-12-12 09:11:39
问题 I have created a controller service to connect to a test db. I have a custom processor that reads data from SQL Server, the mock tests, the build and the deployment to NiFi succeed. The processor runs into error, maybe the nar dependency scope is at fault or ... ? I am unsure The pom for processor and the nar projects are as follows : processor pom.xml <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance

Apache NiFi ExecuteScript: Groovy script to replace Json values via a mapping file

倾然丶 夕夏残阳落幕 提交于 2019-12-12 08:29:53
问题 I am working with Apache NiFi 0.5.1 on a Groovy script to replace incoming Json values with the ones contained in a mapping file. The mapping file looks like this (it is a simple .txt): Header1;Header2;Header3 A;some text;A2 I have started with the following: import groovy.json.JsonBuilder import groovy.json.JsonSlurper import java.nio.charset.StandardCharsets def flowFile = session.get(); if (flowFile == null) { return; } flowFile = session.write(flowFile, { inputStream, outputStream -> def