Multiple binds in v3.x #1131
Unanswered
philip-newzoo
asked this question in
Q&A
Replies: 2 comments
-
You don't need to do anything now. There is a separate metadata per bind, each metadata will have only the tables for that bind. |
Beta Was this translation helpful? Give feedback.
0 replies
-
I'm getting errors like this when I run a query that touches the GBQ tables.
It looks like the query is still being routed to Postgres. One difference that may not have been obvious from the code is that the GBQ models we have are purely reflected. Maybe this is the source of our problems? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We have models in both Postgres and Google BigQuery. In the previous v2.5.x we defined a
__bind_key__
on the models and then monkey patched theget_tables_for_bind
to ensure that the metadata was correctly reflected. My question is how do I migrate this to v3.x?My issues are that some internal functions that we used to monkeypatch are no longer present. I think
_execute_for_all_tables
should now be called_call_for_binds
. I'm not sure whatget_tables_for_bind
should be as this has been removed.Also open to suggestions if we've been going about the code all wrong and should have a different approach.
Any help gratefully received.
Our models are defined like so
Queries that access the GBQ tables fail because they're looking for them in Postgres.
Beta Was this translation helpful? Give feedback.
All reactions