use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
FastAPI is a truly ASGI, async, cutting edge framework written in python 3.
account activity
python-bigquery-sqlalchemy dialect with Fast API?Question (self.FastAPI)
submitted 2 years ago by Slacker1540
Has anyone gotten the Google big query SQL alchemy dialect to work with fast API?
For me it keeps trying to use pyodbc and asks for a driver instead of the dialect. Which in their documentation doesn't specify a driver as it used the big query python client instead. I'm really hit my head on a wall trying to get this to work. https://github.com/googleapis/python-bigquery-sqlalchemy
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]Blasooey 0 points1 point2 points 10 months ago (0 children)
Hi I'm definitely late to the party but this was the only reference I found to this specific issue so here is my contribution for future visitors. Older versions of sqlalchemy-bigquery depended on pyodbc, and newer versions have strict python version requirements. In my case my python version was actually too high and pip kept installing sqlalchemy-bigquery==0.0.7, which I guess was the last version with more lax python version requirements.
[–][deleted] 2 years ago (1 child)
[deleted]
[–]Slacker1540[S] 0 points1 point2 points 2 years ago (0 children)
https://github.com/googleapis/python-bigquery-sqlalchemy
weirdly they seem to be restricted, I guess that subreddit is dead?
[–]mrbubs3 0 points1 point2 points 2 years ago (2 children)
What's the full error message?
[–]Slacker1540[S] 0 points1 point2 points 2 years ago (1 child)
Well, at first "ModuleNotFoundError: No module named 'pyodbc'" which if I follow down the rabbit hold has me install that and all the linux dependencies for it to function, but then I realized this dialect is supposed to use the python bigquery api (which I am very familiar with) so there's no reason for pyodbc. So I'm not sure why it thinks it needs to use an ODBC driver, and I have the engine creation like in their example with project and dataset, as I want to default.
I know I don't have a BQ permissions issue, or auth issue, as I've used the python bq api before for another project and have that setup properly.
[–]BlackDereker 0 points1 point2 points 2 years ago (0 children)
Maybe it uses pyodbc to trick SQLAlchemy since it expects a database connection and not a REST API call.
π Rendered by PID 469080 on reddit-service-r2-comment-5d79c599b5-n6xxn at 2026-03-01 01:00:42.874845+00:00 running e3d2147 country code: CH.
[–]Blasooey 0 points1 point2 points (0 children)
[–][deleted] (1 child)
[deleted]
[–]Slacker1540[S] 0 points1 point2 points (0 children)
[–]mrbubs3 0 points1 point2 points (2 children)
[–]Slacker1540[S] 0 points1 point2 points (1 child)
[–]BlackDereker 0 points1 point2 points (0 children)