I ran into some issues when trying to use CTE's in combination with bqutil.
This exectues as expected:
SELECT `bqutil.fn.median`([1,1,1,2,3,4,5,100,1000]) as median
However, after adding a CTE:
WITH covid AS (
SELECT date, daily_confirmed_cases
FROM `bigquery-public-data.covid19_ecdc_eu.covid_19_geographic_distribution_worldwide`
)
SELECT `bqutil.fn.median`([1,1,1,2,3,4,5,100,1000]) as median
BQ throws the error: "Function not found: bqutil.fn.median".
I there a way to explicitly import the BQ utils or any other suggestions to address this issue?