Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Currency conversion enrichment: make the type of rate to use configurable #754

Open
benjben opened this issue Mar 15, 2023 · 0 comments
Open

Comments

@benjben
Copy link
Contributor

benjben commented Mar 15, 2023

The config of the currency conversion enrichment exposes rateAt but it is never used.

Under the hood, the enrichment uses scala-forex (which is based on Open Exchange).

The API allows several types of conversion:

  • With live rate
  • With near-live rate
  • With latest-prior EOD rate
  • With latest-post EOD rate
  • With specific EOD rate

The type of rate being used depends on:

In Enrich it's always the same function that is used (with default EodRoundDown), which means that we can only use latest-prior EOD rate.

It would be great to update the enrichment to make it possible to decide which type of rate to use based on rateAt. Although not strictly required, the proper way would be to create a new schema with the different values in an enum.

At the moment the enrichment works only for some hard coded fields. It would be great to take the opportunity to make the list of fields configurable (e.g. like here).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant