Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

ReplaceText doesn't work properly

avatar
Contributor

replacetext.jpgDear all,

I want to create a CSV file on a monthly bases by executing a SQL script. For this I am using ExecuteSQL processor and ConvertAvroToJSON, SplitJSON, EvaluateJsonPath, ReplaceText and PutFile.

My problem is with ReplaceText processor. Provide a list with empty values even if the JSON values are there and are valid. Please see the attached files. I tried every recommended solution provided here on community but didn't help me.

Kind regards,
Stefan


executesql.jpgevaluatejsonpath.jpgsplitjson.jpg
1 ACCEPTED SOLUTION

avatar
Master Guru
hide-solution

This problem has been solved!

Want to get a detailed solution you have to login/registered on the community

Register/Login
13 REPLIES 13

avatar
Contributor

Hello @Shu,

I didn't added here but of course I tried also with upper letters and still the same issue with ConvertRecord.
With the EvaluateJsonPath, same issue again. I tried many other things but nothing worked. I was thinking that it will be really easy to output a file from a simple select query from a table but it seems that is not like that..

avatar
Master Guru

@Stefan Constantin

I tried with your sample record and i'm able to get the csv data as i have mentioned in the comment above and also i have attached my xml you can save and upload to your NiFi instance and compare both find where are you missing some configs.

Could you share your Convert Record processors Record Reader, Record Writer,Avro Schema Registry Config screenshots.

avatar
Master Guru
hide-solution

This problem has been solved!

Want to get a detailed solution you have to login/registered on the community

Register/Login

avatar
Contributor

Hello everyone !
I tried with Embedded schema, like Shu mentioned, and now everything is working perfectly. I feel so bad that it was so easy and simple, just few processors...anyway, thank you for your time and help, I really appreciate it !

Kind regards,
Stefan