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.

ConvertJsonToSQL doesn't work

Highlighted

ConvertJsonToSQL doesn't work

Dear all,

I am using the processor ConvertJsonToSQL in order to convert a plain JSON to SQL but it doesn't work saying: None of the fields in the JSON map to the columns defined by the MY_TABLE table.

I tried also with the property Translate Field Names set to false because the columns are identical but also set to true. The DBCP connection is properly set and the Avro schema as well. Can you let me know what else should I try ? Thank you !

Kind regards,logic.jpgconvertjsontosql.jpg
Stefan

3 REPLIES 3
Highlighted

Re: ConvertJsonToSQL doesn't work

Dear all,

I set the property Unmatched Field Behavior to Fail and Unmatched Column Behavior to Warn in order to see the columns which are "bad". I start again the processor and the column where it says that Cannot map JSON field 'competitorname' to any column in the database is wrong because I took the name and I search in the table and is not any mismatching, the name are identical.
I do not have any idea how to proceed further...I tried everything...could you please advise ? Thank you !

Kind regards,
Stefan

Highlighted

Re: ConvertJsonToSQL doesn't work

Super Guru

The table name in your ConvertJSONToSQL processor is specified as "sucess_ept_table", where there appears to be a typo in "success". Is your DB table name missing the extra "c" as well?

Highlighted

Re: ConvertJsonToSQL doesn't work

Hello @Matt Burgess,

I am sorry for the bad name but yes, in the DB the name of the table is identical, I copied the name of the table from the script and I put it in the processor. I also drop the table and recreate it again.
I tried also in another DB and the behavior is the same. Thank you for letting me know if you think to other solutions or workarounds. As you can see, I apply a JSON schema on a CSV file and the good records I want to insert them in an Oracle table.

Kind regards,
Stefan

Don't have an account?
Coming from Hortonworks? Activate your account here