move-coop / parsons

A python library of connectors for the progressive community.
https://www.parsonsproject.org/
Other
257 stars 125 forks source link

Enable parameterization of bigquery queries #931

Closed austinweisgrau closed 7 months ago

austinweisgrau commented 7 months ago

Addresses #929

Documentation on BigQuery query parameterization was wrong, but also with the existing implementation of the query method, parameterization was not possible.

Updates are made to enable parameterization of queries using the bigquery client, and documentation is updated to reflect correct usage.

BigQuery python query parameterization requires the use of client.query() rather than cursor.query()

See documentation here: https://cloud.google.com/bigquery/docs/parameterized-queries

austinweisgrau commented 7 months ago

This is fairly high priority for us as it is blocking our migration to BigQuery

austinweisgrau commented 7 months ago

938 significantly refactors the bigquery connector query method, although not in a way that fixes the underlying issue here. This PR will likely need to be redone on top of the state of the code in that PR.

austinweisgrau commented 7 months ago

Replaced with https://github.com/move-coop/parsons/pull/947 to do this work on top of major-release