0
votes

I am writing a customSQL in Tableau to import data from BigQuery.

Columns in BigQuery View Column1 | VALUE(Type = Numeric)

I want to CAST the "VALUE" column to Float, so that the column appears in Tableau

My current SQL query: SELECT Column1, CAST(VALUE as Float) from Table 1

The above statement is giving me an error. Any idea?

2

2 Answers

0
votes

According to this information on the BigQuery site the data type should be FLOAT64.

CAST(values AS FLOAT64)

(Original Answer pre-comment) You are able to convert it to a float in Tableau. FLOAT([YourField])

0
votes

Finally got it to work using the below SQL

SELECT Column1, CAST(VALUE as Float64) AS VALUE from Table 1.

I was missing "AS VALUE" in my previous SQLstatement.

Note: Tableau v2020.3 will support Numeric data type