Member since
06-08-2017
1049
Posts
518
Kudos Received
312
Solutions
My Accepted Solutions
| Title | Views | Posted |
|---|---|---|
| 11227 | 04-15-2020 05:01 PM | |
| 7131 | 10-15-2019 08:12 PM | |
| 3114 | 10-12-2019 08:29 PM | |
| 11499 | 09-21-2019 10:04 AM | |
| 4343 | 09-19-2019 07:11 AM |
11-24-2018
11:19 PM
@Julio Gazeta Please configure RouteOnAttribute processor as shown below, RouteOnAttribute configs: Try to run the flow now.
... View more
11-23-2018
07:57 PM
@Jeong Jong-Duk Using external Database: There are LookupRecord/LookupAttribute/SelectHiveQL/FetchHbase processor available in NiFi as you can setup lookupservice then you are able to retrieve the avro schema from Database. (or) Using NiFi processors: You can add Avro schema attribute by using NiFi UpdateAttribute Advanced usage by checking the filename you can add the appropriate avro schema as the flowfile attribute then in your Record Reader/Writer controller services uses that schema. This is basically a case statement in UpdateAttribute processor based on filename we are making decision which schema we need to add to the flowfile, you need to define schema with avro logical type(timestamo) and configure record reader/writer controller services with the timestamp/time/date formats so that processor can read/write the flowfile content to postgressql. Refer to this link to configure and usage of UpdateAttribute Advanced usage.
... View more
11-23-2018
07:48 PM
1 Kudo
@Jose Paul I don't think so, Bins are assigned to each unique attribute(if correlation attribute name) specified in your case you haven't specified any attribute name in this property. We need to keep Maximum number of Bins more than >1 jira addressing this issue. Refer to this link for more details how bins are assigned in merge content processor.
... View more
11-23-2018
05:06 PM
1 Kudo
@Jose Paul Change your MergeContent Processor Min Entry to more than 1 if we keep 1 then processor will send as soon as 1 flowfile will reach to the queue(it satisfied min num of entires) and Max Bin Age will not be considered at this time. Configs: With the above configs processor will wait until Min Number of entries reaches to 10k (or) Max Bin Age will be considered if processor not able to reach 10 k in 1 min. Then merge content processor force merges all flowfiles that are waiting on the queue. Don't keep too many Bins if not necessary as bins are kept in NiFi memory.
... View more
11-23-2018
12:25 AM
1 Kudo
@Mahendra Hegde AFAIK we cannot extract only the value using Jolt transform. To achieve this extract the array from the json using `EvaluateJsonPath` processor EvaluateJsonPath Configs: Now using ReplaceText processor replace ",[,],space from the extracted value using NiFi expression language. ReplaceText Configs: Search Value
(?s)(^.*$)
Replacement Value
${country_list:replaceAll('(\[|\]|"|\s)','')}
Character Set
UTF-8
Maximum Buffer Size
1 MB
Replacement Strategy
Always Replace
Evaluation Mode
Entire text Input: {
"organization_id": "life-360",
"message_type_id": "MSG01",
"consent_required": "1",
"country_list": [ "GB", "IT", "BG" ]
} Output: GB,IT,BG Flow: 1.other processors
2.EvaluateJsonPath //extract the json array as attribute value
3.ReplaceText //replace the content of flowfile with extracted value
4..other processors
... View more
11-22-2018
10:59 PM
1 Kudo
@Jose Paul There is no Min Bin Age property in MergeContent but the processor have Max Bin Age property where you can specify the time then Processor force merges flowfiles that are waiting in the queue. In Addition If you are doing some filtering on the records to exclude them from the flowfile then use QueryRecord processor. -Configure/enable the Record reader/writer controller services and add the sql query property as select*from FLOWFILE where id <>10 now processor runs the above sql query and send the results as output flowfile. By following this way we don't need to use merge content (or) split text processors.
... View more
11-21-2018
02:03 PM
@Kei
Miyauchi
Yes, i meant https://community.hortonworks.com/content/supportkb/193756/automatic-minor-compaction-on-hive-is-not-working.html this page. Use merge content processor after PutHiveStreaming and configure the processor to wait for minimum 10 flowfiles (or some other number) and merge them into one then feed the merged relation to ReplaceText processor, by using merge content processor we are going to wait for atleast 10 flowfiles and then triggering minor compaction. Flow: --other processors
-->PutHivestreaming
--> MergeContent
-->ReplaceText processor
-->PutHiveQL
... View more
11-20-2018
02:22 PM
@Kei
Miyauchi
If you want to trigger minor/major compactions from NiFi then feed the Success relationship PutHiveStreaming processor to Replace Text process and configure ReplaceText processor with below configs: replacement strategy always replace and replacement value as alter table <db_name>.<table_name> compact 'minor'; Then using PutHiveQL processor execute the minor compaction. Flow: --other processors
--> PutHivestreaming
--> ReplaceText processor
--> PutHiveQL By following this way we are initializing minor compaction from NiFi. Take a look into this SupportKB related to Minor Compactions are not working in Hive, set the recommended global configs to make minor compactions work.
... View more
11-20-2018
08:43 AM
2 Kudos
@Mahendra Hegde it's possible in NiFi but it depends on how frequently you are going to restart NiFi instance. Use GenerateFlowFile (or) other processors and schedule the processor as shown below With the above schedule GenerateFlowFile processor going to run once we start processor and next run will be after 1111111110 sec (or) when you restart NiFi instance. For your case adjust the Run Schedule time based on your NiFi restart time.
... View more
11-20-2018
03:33 AM
@Julio Gazeta i think you need to use Wait-Notify processors for this case and process each flowfile only once. Refer to this and this links for more details regards to the design/configure NiFi flow for same exact use case.
... View more