Skip to content

Standard library of custom BigQuery functionsΒ #27

Open
@rviscomi

Description

BigQuery supports dataset-level custom functions that are publicly reusable. This can be a useful way to abstract away boilerplate SQL needed for common routines. Here's an example of a query that generates custom functions for CWV analysis. We could also write functions for other HA-centric use cases like URL manipulation, HTTP header parsing, etc.

We can maintain the functions in GH for source control as SQL files, which also lets the community submit improvements to existing custom functions or submit their own custom function ideas if they're generally useful.

A nice-to-have is a CI process that runs unit tests on the functions and executes their SQL to update them on BigQuery.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions