I am pretty new to elasticsearch and was trying to get data from a postgres database to elasticsearch. I have currently used the following link to get data:
The issue, i am facing is the mapping of the incoming data. As mapping is done default and it uses the first element of the input. My JSON obecjt from postgres is being recognised as a string .
eg.
I think its just taking it as a string , so elasticsearch itself assumes it to be a string as well. I was thinking, can we save mapping in a way that the string can be stripped and get converted into a json object. My final goal is to essentially use the fields such as (max and min) and plot data via kibana
The JDBC importer can not recognize the JSON automatically und decided to proceed with a string. To be valid ES document JSON, it must have embracing { and }. You can tweak your SQL statement with string concatenation to achieve this.
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.