Member since
01-17-2018
10
Posts
0
Kudos Received
0
Solutions
07-26-2018
05:33 AM
Hello, The data I exported through the database is in Avro format. I split it with SplitAvro in the first place because the data size is bigger. I will then translate it into json format with the ConvertAvroToJSON operator. I am trying to combine them with the latest MergeContent processor, but I can not make a single file. I share an Avro data of 2500 entries as an example. I will divide it into 1000 records and 3 parts are formed. I can not edit the MergeContent operator to make it a single piece. I looked at a few places but I could not do it. "Correlation Attribute Name" - filename did not work even though the file name is the same. template attachment file and sample data thank you in advance. merge-test.xmldata.txt
... View more
Labels:
06-29-2018
09:29 AM
@Murat Menteşe As your xml doc having array [] in it and i'm not sure how to write matching xslt. As the current xslt converts the array xml into object/element and adding "" for array[]. In case of large data you have to increase the Maximum Buffer Size 1 MB //increase based on your flowfile size as this processor works takes the whole flowfile into memory and does all replacing based on our configs.
... View more
07-17-2018
01:42 PM
@SaiKumar Akula The same flow above will still work for you except swap out the GenerateFlowFile processor for a GetFile processor. Simply set a "run schedule" for how often you want the GetFile to read the source file and change "Keep Source File" property to true. Every time the processor executes it will read the source text file and it can be passed to the splitText processor in above flow and so on... As long as you don't change the source file's filename, you can edit whenever you want to add new lines or remove URL lines. - - Thanks, Matt
... View more
01-17-2018
11:03 AM
2 Kudos
@Murat Menteşe
In Extract Text processor add new properties in configure menu by clicking on the + sign at right corner. Configs:- Attribute 1 (.*?); Attribute 2 .*?;(.*?); Attribute 3 ;.*?;(.*?); Attribute 4 ^.*;.*;(.*);.*; Attribute 5 ^.*;.*;.*;(.*); Attribute 6 ^.*;.*;.*;.*;(.*)
Screenshot:- (Or) Add properties with below regex matches Attribute 1 (.*?); Attribute 2 .*?;(.*?); Attribute 3 ;.*?;(.*?); Attribute 4 .*?;.*?;.*?;(.*?); Attribute 5 .*?;.*?;.*?;.*?;(.*?); Attribute 6 .*?;.*?;.*?;.*?;.*?;(.*) Screenshot:- Output:- As you can see in above output screenshot both regex matches and gives same results once we extract all the contents as attributes then you can use expression language like ${Attribute 1} to get 1096 value ..etc. **Note** Keep no space in attribute names like Attribute_1 instead of Attribute 1,that would be easy to retrieve attribute value inside NiFi Flow. Change the Attribute names without spaces in Extract Text Processor. . If the Answer helped to resolve your issue, Click on Accept button below to accept the answer, That would be great help to Community users to find solution quickly for these kind of errors.
... View more