I'm trying to import some json data that is in a column in redshift. Some of the records have a field that includes invalid json escape sequences, such as this:
"work_title": "The Discrete and Semi-continuous Fr\'echet Distance with Shortcuts via Approximate Distance Counting and Selection Techniques"
"work_title": "On the \(\partial\overline{\partial}\)-Lemma and Bott-Chern cohomology"
I can remove the first one with logstash using this:
input {
jdbc {
}
}
filter {
mutate {
gsub => [
"json_elastic", "\\'", "'"
]
}
json {
source => "json_elastic"
}
mutate {
remove_field => ["json_elastic"]
}
}
output {
stdout { }
}
But is there a way I can expand this to remove the other '/'? I tried this but I get a configuration error:
mutate {
gsub => [
"json_elastic", "\\", ""
]
}
Or is there a way to not parse json within that field and simply get the text?