Created 04-02-2018 12:23 PM
Hi,
First of all, a data sample :
{ "type" : "Feature", "properties" : { "commune" : "VENISSIEUX", "voie" : "Rue Eugène Hénaff", "numerodansvoie" : "10", "gestionnaire" : "NET Sud-Est", "observation" : "Entrée Subdivision NET SUD-EST face \"magasin\"", "identifiant" : "C61544", "gid" : "15" } }
We can see about the observation field value, there are double quotes already escaped from the source. Perfect for the next operations, but...
When I use EvaluateJsonPath to set an flowfile attribute from this value, like this :
observation ----> $.properties.observation
Value is not :
Entrée Subdivision NET SUD-EST face \"magasin\"
But :
Entrée Subdivision NET SUD-EST face "magasin"
Double quotes are removed. This is a problem because I push this data in MariaDB. So classic "syntax error".
There are lot of solutions like ReplaceText, "?" with sql.args (but sometimes values are empty, an exception occurs). But there is a solution with EvaluateJsonPath directly ?
Thanks !