Is there any currency conversion function in GCP Bigquery?

111 Views Asked by At

I'm trying to migrate a procedure from SAP HANA to GCP bigquery. The procedure in HANA uses a native function - CONVERT_CURRENCY in HANA which allows me to provide a historical date and it gives me the currency conversion for a specific currency to be converted in USD for that historical date. Trying to replicate the same in GCP and need help.

1

There are 1 best solutions below

0
On

There's not a native function in BigQuery for this - you'd need to create and populate a separate table with FX rates and join this to your main table based on the native currency and either a) the date field of interest or, b) a set date that you filter the FX table to if you're setting the date manually.