ibis-bigquery icon indicating copy to clipboard operation
ibis-bigquery copied to clipboard

ENH: Persistent UDFs for BigQuery

Open jaketf opened this issue 5 years ago • 1 comments

It's very nice to have a python interface for defining UDFs that are compiled to javascript as temporary functions. It would be even more useful if these UDFs could be registered as persistent UDFs (which can be used in logical views). This would allow data scientists w/o javascript skills to inject basic python logic for common tasks like string parsing into logical views. CC: @tswast

jaketf avatar Aug 07 '20 22:08 jaketf

One thing that's relevant to issue is how to expose these UDFs once they are available. I see that the postgres backend has support for this (recently touched in https://github.com/ibis-project/ibis/pull/3932).

https://github.com/ibis-project/ibis/blob/e076050139a3ba7afbcaac4a7ae6f33d5a2e377d/ibis/backends/postgres/udf.py#L73

It also has a udf function for defining permanent UDFs.

https://github.com/ibis-project/ibis/blob/e076050139a3ba7afbcaac4a7ae6f33d5a2e377d/ibis/backends/postgres/udf.py#L130

If we were to add this to the BigQuery backend, it should mimic the same API IMO.

tswast avatar May 19 '22 22:05 tswast