oso icon indicating copy to clipboard operation
oso copied to clipboard

Standardizing Currency Data from Open Collective

Open Jabolol opened this issue 1 year ago • 1 comments

What is it?

Open Collective currently returns currency data in local currencies without a standardized parameter. This conflicts with the universal event table's definition, where the amount field assumes a consistent currency.

After discussing with the team, potential solutions include: collecting only USD transactions for consistency, maintaining a daily table of currency exchange rates in BigQuery as a source of truth, or introducing an additional API to handle conversions.

Edit: For now, we will filter out all non USD transactions

Jabolol avatar Sep 24 '24 16:09 Jabolol

I think that's fine for now. The nature of dbt makes it very easy to change this in the future.

FWIW, in the timeseries_metrics marts, we introduce a unit column for this reason, because there are different unit measures for different metrics. https://github.com/opensource-observer/oso/blob/main/warehouse/metrics_mesh/models/timeseries_metrics_by_project_v0.sql

It wouldn't hurt to introduce a nullable unit column in the event table to capture this kind of information.

ryscheng avatar Sep 24 '24 23:09 ryscheng