Import data from MongoDB to BigQuery - Decimal128

Hi, I want to import data from my Mongo collection to the BigQuery table using google dataflow.

There is a problem with type Decimal128, which is not supported by BQ. For example value -4 in Mongo is stored as {“high”:-5746593124524752896,“low”:4} in BQ. How can I convert this pair into the real value?

So far I’ve tried:

  • UDF in dataflow, but the runtime error occurs (without UDF it works),
  • different parsing in BQ

Regards,
Mateusz