apache-nificloudera

Nifi throwing None of the fields in the record map to the columns defined by [table name]


Am trying execute a sql query on oracle database and inserting the result into another table, for my trial am just performing a simple query as

SELECT 1 AS count 
  FROM dual

and trying to insert that into a single column table which has the name COUNT. The content of the record on Nifi seems to be as follows

[
 { 
   "COUNT" : "1" 
 }
]

but the logs keeps throwing the error

due to java.sql.SQLDataException: 
None of the fields in the record map to the columns defined by 
the schema_name.table_name table:

any ideas ?

enter image description here


Solution

  • I believe you get that same error message if your table name doesn't match. The Translate Field Names property only translates the fields (columns), not the table name. Try specifying the schema/table in uppercase to match what Oracle is expecting.