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.

Nifi executeSql on postgresql produce error cannot be converted to Avro type

SOLVED Go to solution
Highlighted

Nifi executeSql on postgresql produce error cannot be converted to Avro type

Rising Star

Hi

When executing a select statement in executeSql processor on a posrgresql i get this error

Unknown SQL type 1111 cannot be converted to Avro type

The column causing this is a json type column, i have tried to google how to cast the json to a string put i doesn't seems to be so simple.

It works fine when i does it without that column

Does anybody know about a workaround on this.

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Nifi executeSql on postgresql produce error cannot be converted to Avro type

Rising Star

I found the solution my self, much more simple than i first thought, just cast the json type to text and avro will accept it.

select cast (json column as text ) columnName

from table

1 REPLY 1

Re: Nifi executeSql on postgresql produce error cannot be converted to Avro type

Rising Star

I found the solution my self, much more simple than i first thought, just cast the json type to text and avro will accept it.

select cast (json column as text ) columnName

from table