Hi, all
Is there any way to disable json's automapping?
I tried to use the template to disable the numeric detection but it does not work.
Since my data has many fields, it does not make sense to change type for each field manually.
Thanks.
Hi, all
Is there any way to disable json's automapping?
I tried to use the template to disable the numeric detection but it does not work.
Since my data has many fields, it does not make sense to change type for each field manually.
Thanks.
Are you saying that you want the JSON to be parsed but everything converted to strings?
Hi Badger,
Thanks for the reply.
Yes. I only need one value to be long and the rest to be strings.
So I want to disable the auto mapping.
Here is my logstash input plugin
input {
file {
path => "/data/Aggregation_json/all_aggregation.json"
codec => json
start_position => "beginning"
sincedb_path => "/dev/null"
}
}
You cannot disable it, but you can iterate over the event in a ruby filter and .to_s everything.
Thanks a lot, I will try it.
This might help you understand how to iterate over arbitrary event structures. It solves a different problem (making all keys and values lowercase) but making all values strings is similar enough for it to be useful.
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
© 2020. All Rights Reserved - Elasticsearch
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant logo are trademarks of the Apache Software Foundation in the United States and/or other countries.