Skip to main content
dk123
Silver ⭐️
December 6, 2019
Solved

NiFi SchemaParseException: Illegal initial character

Hi All,

when using the MergeContent processor I'm getting an avro.SchemaParseException due to $ characters in a nested attribute name ($.Snapshot.Events.['$values'][0].SportsUrn) in a json file. I have tried to fix it with the UpdateAttribute processor, but it won't work. What would be the best way to handle this exception?

Your support is highly appreciated!

Thanks

image.png

MattWho
MattWhoAnswer
Titanium ⭐️⭐️⭐️
December 9, 2019

@dk123 

 

You may want to use the replaceText processor to update your FlowFile's json content.

 

My suggestion would be to replace all occurrences of $ with either \$ or \\$

Hope this helps,

Matt

2 replies

MattWho
Titanium ⭐️⭐️⭐️
MattWhoAnswer
Titanium ⭐️⭐️⭐️
December 9, 2019

@dk123 

 

You may want to use the replaceText processor to update your FlowFile's json content.

 

My suggestion would be to replace all occurrences of $ with either \$ or \\$

Hope this helps,

Matt

Translate
dk123
dk123Author
Silver ⭐️
December 10, 2019

Hi Matt, thanks - works fine for me!

Translate