Support Questions

Find answers, ask questions, and share your expertise

load flowfile content into clob datatype using putSQL

avatar
Explorer

Hi, Can someone share their idea on how to load complete flow file content into a table having clob datatype.

I have tried to achieve this using invokehttp->evaluatexpath->updateattribute->replacetext->putSQL. But it throws an exception with string literal too long. If flow file content is less than 4000 then it works fine but if it is of huge file then it throws error.

I am downloading couple of files from rest service and want to load them into a table with clob column.

108243-1556192099324.png

2 REPLIES 2

avatar
Master Guru

You'll need to provide the CLOB as an attribute, meaning you've set attributes like sql.args.1.type to 2005 and sql.args.1.value to the CLOB value. Then your SQL statement would have a ? parameter, and the CLOB value will be inserted when the SQL statement is prepared. See NIFI-4352 for more information.

avatar
Explorer

Hi Matt, I am not sure how to create the flow. In my case i have .xml files downloaded from http request and these files need to be uploaded into a clob column in oracle. I tried to define the sql.args.1.type as 2005 still no luck. can you share any example where we can upload huge flow file content into clob types.