Handling comma floats instead of periods in BigQuery

I have some large files that I want to parse using Google BigQuery.

It worked very well, with the exception of fields with floats: I can only import them as strings, since their decimal places are stored as commas, not periods.

How can I get around this?

+4
source share
1 answer

Importing them as a string seems fine, then starting an ETL inside BigQuery should be fast enough (REGEX_REPLACE + FLOAT).

SELECT 2*FLOAT(REGEXP_REPLACE("1,30001", ",", "."))
+5
source

All Articles