Member since
01-11-2016
355
Posts
230
Kudos Received
74
Solutions
My Accepted Solutions
Title | Views | Posted |
---|---|---|
8191 | 06-19-2018 08:52 AM | |
3148 | 06-13-2018 07:54 AM | |
3575 | 06-02-2018 06:27 PM | |
3887 | 05-01-2018 12:28 PM | |
5408 | 04-24-2018 11:38 AM |
07-14-2019
04:58 PM
The above question and the entire response thread below were originally posted in the Community Help track. On Sun Jul 14 16:56 UTC 2019, a member of the HCC moderation staff moved it to the Data Ingestion & Streaming track. The Community Help Track is intended for questions about using the HCC site itself.
... View more
10-13-2017
12:45 PM
It worked perfectly. Thanks!
... View more
08-29-2018
06:42 AM
Hi @Patrick Maggiulli I tried the same flow, i am putting the data into HBase from HTTP. I have one CSV file that contains field (ID,Movie,Type), In GetFile processor i am taking this file and flow remains same as yours. In UpdateAttribute i am giving schema.name is "MoviesRecord". But getting error in ConvertRecord processor that ConvertRecord is failed to process StandardFlowFileRecord "will route to failure Field field_0 can not be null. " Any help that would be great. Thanks
... View more
10-12-2017
01:13 PM
@Simon Jespersen You can use UpdateAttribute and create a new attribute with the following EL : ${filename:getDelimitedField(3,'_')}
... View more
06-04-2019
09:52 AM
Waht If i wanted to put my parquet into an S£ instead of HDFS?
... View more
10-12-2017
02:25 PM
Hi @Alexandru Anghel, ive uploaded a new question with my whole use case and logic here. Any help really appreciated!
... View more
10-10-2017
05:39 PM
2 Kudos
@Hameed Abdul This is the expected behavior. Your file name is local to your client environment and NiFi have no clue on where it comes from. You need to send this information together with your file. The number that you are seeing is the ID that NiFi generated for this received flow file. How to send data depends on your client. If I use CURL to upload data I can do curl --form "fileupload=@/tmp/file1.txt;filename=file1.txt" localhost:7878
and I receive the following in NiFi --------------------------2c1843649b5760e1
Content-Disposition: form-data; name="fileupload"; filename="file1.txt"
Content-Type: text/plain
this is file 1
--------------------------2c1843649b5760e1--
You can use ExtractGrok or ExtractText to get the filename and update the flow file attribute. EDIT: As I said, this depends on your client. I did the same test with Postman and here's how to get the right information. Add a header to your POST query. I added a header called originalfilename I get this information as an attribute of my flow file With this you only need to use UpdateAttribute processor to copy this attribute to filename. Hope this helps
... View more
10-10-2017
09:14 PM
@Mohamed Ashraf Following your question, I wrote an article on how to use PutParquet to convert data. Check it out to have a better understanding on the process. https://community.hortonworks.com/articles/140422/convert-data-from-jsoncsvavro-to-parquet-with-nifi.html I hope this helps
... View more
10-07-2017
08:02 AM
7 Kudos
Introduction This is part 3 of a series of articles on Data Enrichment with NiFi:
Part 1: Data flow enrichment with LookupRecord and SimpleKV Lookup Service is available here Part 2: Data flow enrichment with LookupAttribute and SimpleKV Lookup Service is available here Part 3: Data flow enrichment with LookupRecord and MongoDB Lookup Service is available here Enrichment is a common use case when working on data ingestion or flow management. Enrichment is getting data from external source (database, file, API, etc) to add more details, context or information to data being ingested. In Part 1 I showed how to use LookupRecord to enrich the content of a flow file. This is a powerful feature of NiFi based on the record based paradigm. For some scenarios we want to enrich the flow file by adding the result of the lookup as an attribute and not to the content of the flow file. For this, we can use LookupAttribute with a LookupService. Scenario We will be using the same retail scenario of the previous article. However, we will be adding the city of the store as an attribute to each flow file. This information will be used inside NiFi for data routing for instance. Let's see how we can use LookupAttribute to do it. Implementation We will be using the same GenerateFlowFile processor to generate data as well as the same SimpleKeyValueLookupService. In order to add the city of a store as an attribute, we will use a LookupAttribute with the follwing configuration: The LookupAttribute processor will use the value of the attribute id_store as a key and query the lookup service. The returned value will be added as the 'city' attribute. To make this work, the flow files should have an attribute 'id_store' before entering the lookup processor. Currently, this information is only in the content. We can use an EvaluateJsonPath to get this information from the content to attribute. The final flow looks as the following: Results To verify that our enrichment is working, let's see the attribute of after the EvaluateJsonPath and then the LookupAttribute:
... View more
Labels:
10-07-2017
07:36 AM
1 Kudo
@Hans FeldmannThe best thing to explain this is to take an example. Let's say that you want to add an attribute city with a SimpleKVLookupService. And you will be doing the lookup by an attribute id_store (look at this article to understand the logic behind this use case).
You need to configure LookupAttribute as follows: This means that the processor will use the value of the attribute id_store as a key and query the lookupservice. the returned value will be added as an attribute city. Here's the result: Of course, the flow file should have the attribute id_store before going in LookupAttribute. And here's the content of the SimpleKVLookupService I hope this helps
... View more