Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

How can I load an entire flowfile (JSON) in a Cassandra column from NiFi?

Highlighted

How can I load an entire flowfile (JSON) in a Cassandra column from NiFi?

New Contributor

Hi,


I'd like to know if is it possible to insert a whole JSON (incoming flowfile) to a specific column in a Cassandra table. This column is a text-type column, so the JSON would have to be inserted as a String. Which processors should I use to achieve my objective? I've tried with PutCassandraRecord but it didn't work.

Many thanks for your attention.

1 REPLY 1

Re: How can I load an entire flowfile (JSON) in a Cassandra column from NiFi?

Super Guru

@CarlosHS

You can use PutCassandraQL processor and extract all content of flowfile using ExtractText processor.

Then prepare your insert statement and insert data into cassandra.

Refer to this link for more details.

(or)

If you are having CSV data then You can configure CSV reader(in PutCassandraRecord) value separator which is not separator in data like ~ (or) some other characters not presented in the data.

So that processor reads entire data as one value and writes to cassandra table.