I am newbie to elastic/kibana and i am stuck with a problem.
I have transactional records in which multiple currency types are used like
doc - 1
{
Amount : 500
Currency : USD
}
doc -2
{
Amount : 100
Currency : CAD
}
In Kibana, i want to display the sum of the amount in USD.
I thought about adding a new index with the currency-exchange rate mapping and then join it with transaction index as we do in RDBMS, but it is not possible in elastic.
Thanks lukas for the reply.
i thought about that.
But by doing that, i have to write a big script to convert all types of currencies; and updating the conversion rate periodically would be a challenge.Although this is the easiest solution, this might not be a suitable approach in long run.
Is storing another field with [AmountInUSD] from application side the best solution for this problem?
Yes, you could do that too. If you do that, then the amount would be fixed, which may or may not be what you want. If you want the amounts to always reflect the amount in USD at the time of purchase rather than the current time, then it would be the better solution.
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.