honeysql

markaddleman 2023-11-14T15:02:47.683429Z

Is there a way to prevent upper-casing of function names?

markaddleman 2023-11-14T15:03:31.164119Z

Although I haven’t found documentation to support this, it appears that external BigQuery JavaScript UDFs are case sensitive.

markaddleman 2023-11-14T15:04:20.005719Z

The library of community-built UDFs have lower case names which makes them cumbersome to reference with honey

markaddleman 2023-11-14T15:06:46.351039Z

Currently, I have a custom formatter and reference using

{:select [[[:fn.cw_array_distinct [:array_agg :a]]
                         :step-array]]} 

markaddleman 2023-11-14T15:07:06.774859Z

I couldn’t figure out how to get :raw to work in function call position

p-himik 2023-11-14T15:22:32.648939Z

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"]

markaddleman 2023-11-14T15:23:29.688379Z

Nice! Thanks!

👍 1
seancorfield 2023-11-14T17:31:18.581649Z

@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).

markaddleman 2023-11-14T19:58:38.709939Z

Thanks for the pointer! Somehow I missed this in my search

2023-11-14T17:37:18.536019Z

2023-12-02T19:48:10.737089Z