Is there a way to prevent upper-casing of function names?
Although I haven’t found documentation to support this, it appears that external BigQuery JavaScript UDFs are case sensitive.
The library of community-built UDFs have lower case names which makes them cumbersome to reference with honey
Examples are here: https://github.com/GoogleCloudPlatform/bigquery-utils/blob/master/udfs/community/README.md#cw_array_distinctarr-any-type
Currently, I have a custom formatter and reference using
{:select [[[:fn.cw_array_distinct [:array_agg :a]]
:step-array]]} I couldn’t figure out how to get :raw to work in function call position
Add ' after :, as in:
(sql/format {:select [[[:'fn.cw_array_distinct [:array_agg :a]]
:step-array]]}
)
=> ["SELECT fn.cw_array_distinct(ARRAY_AGG(a)) AS step_array"]Nice! Thanks!
@markaddleman See https://cljdoc.org/d/com.github.seancorfield/honeysql/2.5.1091/doc/getting-started/other-databases#bigquery-google (happy to add more BigQuery hints and tips there).
Thanks for the pointer! Somehow I missed this in my search