Member since
09-27-2018
138
Posts
23
Kudos Received
10
Solutions
My Accepted Solutions
| Title | Views | Posted |
|---|---|---|
| 12761 | 02-28-2021 10:23 PM | |
| 2870 | 02-08-2021 11:53 PM | |
| 38661 | 12-16-2020 11:31 PM | |
| 10438 | 12-14-2020 11:02 PM | |
| 7900 | 12-14-2020 12:18 AM |
02-28-2021
10:23 PM
1 Kudo
@murali2425 Here are two possible solutions. At solution 1 the value is set into an array. At solution 2 I took the flowfile-content (json) and set it into an attribute. Then you can work with expression language to get the value. For testing the syntax I recommend this site: http://jsonpath.herokuapp.com/
... View more
02-16-2021
09:40 AM
1 Kudo
@BerniHacker Come on work can wait... Here my description with NiFi 1.12.1. on a windows standalone installation. This is my test csv. id;title;first;last
1;miss;marlene;shaw
2;ms;letitia;jordan
3;mr;todd;graham
4;mr;seth;martinez
5;mr;guy;mckinney
6;ms;anna;smith
7;mr;johnny;johnson
8;mrs;robin;white
9;miss;allison;williams
10;mrs;erika;king This is my flow: Flow This is my sql table. SQL table This is the configuration of the csv-reader. Note the green bordered information! Controller Service - dsv reader The schema has to be defined in a controller service of the type "AvroSchemaRegistry". AvroSchemaRegistry With the UpdateAttribute you set the NiFi-attribute schema.name to the concrete schema you use. UpdateAttribute schema.name And last but not least configure the PutDatabaseRecord. PutDatabaseRecord Here is the result in my sql table. SQL Result Hope this helps and works for you. Bye!
... View more
02-16-2021
09:13 AM
@BerniHacker The whole day I couldn't achive to work on this further. Now I found a solution but at the moment I can't document this detailed because "work is calling". In small words: GetFile -> UpdateAttribute (to set NiFi-attribute schema.name) -> PutDatabaseRecord (with CSV-Record Reader) BUT the reader has to use a schema which is defined in the controller services as AvroSchemaRegistry and there has to exist a avro schema for the structure. Maybe this will help you further. Have a look here https://community.cloudera.com/t5/Support-Questions/Loading-a-simple-CSV-file-using-nifi-PutDatabaseRecord-and/td-p/222678 Tomorrow I will describe my solution detailed! Sorry...
... View more
02-15-2021
11:11 PM
@BerniHacker Sorry, my reply was not good. Did not see that you are working with "Use String Fields From Header" and not a separate schema. I will try to get it work on my local installation. If you found a solution by so kind to let us know. Thanks.
... View more
02-15-2021
10:42 PM
@BerniHacker As far as I see the cause could be different column names and in the PutDatabaseRecord the option "Unmatched Column Behavior" is set to "Fail on Unmatched Columns". I suppose the options concerning "Unmatched Field Behavior" or "Unmatched Column Behavior" in connection with "Translate Field Names" causing your problem. Perhaps you like to post your schema-definition? But at the moment I can't give you a concreter answer.
... View more
02-08-2021
11:53 PM
Hi @Jarinek I think you have to set -pv in front of the new value: nifi set-param -u http://localhost:8088 -pcid 85b8b5bf-0177-1000-3881-8ddd8d31fed8 -pn sample.URL -pv newvalue This one worked on my local NiFi. Remark: Haven't seen that you found it yourself. Great!
... View more
01-27-2021
03:42 AM
@VidyaSargur i have to change my email. Would you be so kind and get intouch with me? Thank you!
... View more
12-16-2020
11:31 PM
2 Kudos
@GMAN Here is my try to help you further. flow Look at the picture of the InvokeHTTP. InvokeHTTP From my experience most options can mostly be left to default values. Your Json-body should be fine and will be send with the request. Remarks: - Authenticaton/Authorization: You have to try the two possibilities I know. For the second you have to add custom-property "Authorization" with the plus symbol on the right above. - Accept: Concerns the response format not sure wether you will need this. Maybe you can first build your request in Postman and after successfull execution then click to "code" -> "HTTP". There you can see the details needed for the request. In the "Settings" of the InvokeHTTP you can autoterminate the "original" flowfile. For "Retry" you can use the shown processor with default values. All "Failure" or "No retry" go to some error-handling. With "Response" you can go further in your flow. Hope this helps you to come forward.
... View more
12-14-2020
11:02 PM
@adhishankarit Sadly I have no experience doing such kind of logging in own files to a NFS. But what about logging to nifi-app.log? I don't understand the problem you mentioned in your first post concerning this. Using the LogAttribute-processor gives you some options (attributes, content) what and how to log there. With the option "Log prefix" you can evaluate data by this value later. IMHO Logging all attributes would be advantage because not all processors deliver the same attributes after they ran. Maybe you can do something with scripts like mentioned here: https://community.cloudera.com/t5/Support-Questions/Is-possible-to-write-an-attribute-into-a-file-and-also-keep/td-p/184414 Sorry but im neither fit with scripting nor with this kind of logging so I'm not able to help you further. But maybe some other guys here will help you.
... View more
12-14-2020
08:21 AM
@opalo54 Thanks for posting your solution! I was just trying too but I think your input data has to be set to an array for this. Am I getting right?
... View more