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.

load flowfile content into clob datatype using putSQL

Highlighted

load flowfile content into clob datatype using putSQL

New Contributor

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

Re: load flowfile content into clob datatype using putSQL

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.

Re: load flowfile content into clob datatype using putSQL

New Contributor

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.