1
votes

I am trying to fetch a specific record from Database using QueryDatabaseTable -> UpdateAttribute-> PutElasticSearchHttpRecord

The ES processor is throwing error as Java.IO.Exception Invalid char between encapsulated token and delimiter.

Please find attached my config. How to fix this? I am getting the correct result in the queue after 'UpdateAttribute' but not able to push it into ES. I have added the schema.name property to appropriate schema. The following is the correct result i am getting in the queue after UpdateAttribute processor. How to fix the error of Invalid character between token and delimiter?

[ {
  "TimeOfDay" : "2018-09-20T18:10:36.941",
  "BMU_Debug_Pack_BlkVolt_Max2" : 4114.0,
  "BMU_Debug_Pack_BlkVolt_Max1" : 4114.0,
  "BMU_Debug_Pack_BlkVolt_Max3" : 4114.0,
  "BMU_Debug_Pack_BlkVolt_Max0" : 4116.0,
  "BMU_Debug_Pack_CTemp_Min" : 21.0,
  "BMU_Debug_Pack_CurrVolt_Curr" : 2.0,
  "BMU_Debug_Pack_Blk_Volt_Delta" : 6.0,
  "total_Difference" : 15.0
} ]

Thank you! Please help what should I change?

QueryDatabaseTable

QueryDatabaseTable SQL

ElasticSearch

Elasticsearch Config

ES Schema

1

1 Answers

2
votes

You need to configure Avro Reader instead of CSV Reader in PutElasticSearchHttpRecord as QuerydatabaseTable processor outputs flowfile in Avro format.

Use embedded avro schema in Avro Reader controller service. enter image description here