Support Questions

Find answers, ask questions, and share your expertise

Loading a simple CSV file using NiFi (GetFile -> UpdateAttribute -> PutDatabaseRecord) is throwing an Error

avatar

Hi @Andrew Lim @Matt Burgess @Timothy Spann

I am trying to load a simple CSV file (without header) having few rows to Teradata. Further, I am trying to create the table in Teradata by providing the CREATE query in the PutDatabaseRecord processor. My workflow is:

GetFile -> UpdateAttribute -> PutDatabaseRecord

This is how data looks like:

1,18

2,19

3,20

4,21

5,22


This is how the workflow looks like:

93144-6.jpeg

This is how the UpdateAttribute processor looks like:

93139-2.jpeg

This is how the PutDatabaseRecord processor looks like:

93140-3.jpeg

This is how CSVReader looks like:

93141-4.jpeg

This is how AvroSchemaRegistry looks like:

93142-5.jpeg

But, I am getting the below error:

org.apache.nifi.schema.access.SchemaNotFoundException:Unable to find schema with name 'BIGDATA_DL.STUDENT'

Please advise.

4 REPLIES 4

avatar
Master Guru
@nifi_is_awesome

In your UpdateAttribute processor change

schema.name property value to

STUDENT

instead of BIGDATA_DL.STUDENT.

avatar

Thanks for the quick reply @Shu

I changed the above property value but getting the below error:

93168-8.png

avatar
Master Guru

@nifi_is_awesome,

Make sure you are having same field names in target table with your mentioned in avro schema.

Even you can also make use of Unmatched Field/Column Behaviour to ignore incase you are having any unmatched fields in your data.

Refer to this thread regards to similar kind of issue..

avatar

Thanks for your help, I got it working.