On 02/10/2017 07:41 AM, Alexander Peletz wrote:
Hello,

I would like to use Alembic to manage my Hive Metastore. I have
installed, PyHive, SqlAlchemy, and Alembic. I am able to create a
functional engine object using the 'hive' dialect in sqlalchemy, however
I cannot get Alembic to recognize this dialect. The problem appears to
be a lack of a HiveImpl class in the Alembic package. I attempted to
resolve this by creating an alembic/ddl/hive.py module and pasting the
following code into that module:


from .impl import DefaultImpl

class HiveImpl(DefaultImpl):
    __dialect__ = 'hive'



you don't actually have to create a "hive.py" file. Anywhere in your hive dialect, simply put the above code that you have (using the correct imports of course). The DefaultImpl uses a metaclass that will allow the "hive" name to be available to alembic as a result of this class being created.






I simply want to be able to execute raw SQL against a Hive instance (no
ORM implementation needed) and I was hoping to use Alembic to manage the
minimum upgrade/downgrade functionality. Are there any simple edits I
can make to the Alembic source code to allow me to achieve this goal?



Thanks,

Alexander

--
You received this message because you are subscribed to the Google
Groups "sqlalchemy-alembic" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to sqlalchemy-alembic+unsubscr...@googlegroups.com
<mailto:sqlalchemy-alembic+unsubscr...@googlegroups.com>.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups 
"sqlalchemy-alembic" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy-alembic+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to