QueryString parsing in BigQuery

Viewed 1950

I have a column in BigQuery that contains a URL querystring, eg a=1&c=1. I'd like to reference some of these in my query, eg. filtering with something like WHERE querystring.c = 1.

My plan is to convert the querystring to JSON, and then use JSON_EXTRACT. I figured I could write a UDF to convert the querystring to JSON, but I can't work out anyway to import the node.js querystring package into my UDF to make this easy.

Is it possible to import a node.js core library into a UDF, and if so, how? Alternatively is there a better way to achieve what I'm trying to do?

1 Answers
Related