Hi,
I'm trying to run a Beam Pipeline with SQLAlchemy. Google DataFlowRunner
doesn't allow me to add MySQLdb to my pipeline running on the cloud. You
can see a description of the issue here
https://stackoverflow.com/questions/56202734/python-mysql-in-cloud-dataflowrunner
.
It seems like every time I try to create an engine the engine requires
`MySQLdb`
```
Traceback (most recent call last):
File "phy/uploader/season_stat_calculator/pipeline.py", line 10, in
<module>
from phy.uploader.season_stat_calculator.upload_season_stats_rocky
import get_batters_for_season, \
File
"/Users/mkwyche/workspace/python/phy/uploader/season_stat_calculator/upload_season_stats_rocky.py",
line 12, in <module>
from phy.shared.models.season_stats.season_stats import SeasonStats
File "/Users/mkwyche/workspace/python/phy/shared/models/__init__.py",
line 19, in <module>
_ENGINE_PHIL_DATA = get_mysql_engine(database=PHIL_DATA, echo=SQL_DEBUG)
File
"/Users/mkwyche/workspace/python/phy/shared/utils/sqlalchemy_utils.py",
line 22, in get_mysql_engine
return create_engine(db_url, echo=echo, pool_recycle=1000)
File
"/Users/mkwyche/workspace/python/.beam_env/lib/python2.7/site-packages/sqlalchemy/engine/__init__.py",
line 435, in create_engine
return strategy.create(*args, **kwargs)
File
"/Users/mkwyche/workspace/python/.beam_env/lib/python2.7/site-packages/sqlalchemy/engine/strategies.py",
line 87, in create
dbapi = dialect_cls.dbapi(**dbapi_args)
File
"/Users/mkwyche/workspace/python/.beam_env/lib/python2.7/site-packages/sqlalchemy/dialects/mysql/mysqldb.py",
line 118, in dbapi
return __import__("MySQLdb")
ImportError: No module named MySQLdb
```
Is there anyway around needing MySQLdb when using SQLAlchemy?
Thanks,
Marcus Wyche
--
SQLAlchemy -
The Python SQL Toolkit and Object Relational Mapper
http://www.sqlalchemy.org/
To post example code, please provide an MCVE: Minimal, Complete, and Verifiable
Example. See http://stackoverflow.com/help/mcve for a full description.
---
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sqlalchemy.
To view this discussion on the web visit
https://groups.google.com/d/msgid/sqlalchemy/b20a22f4-5cc7-4191-adf4-b8ab5abba4c6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.