vmware-archive / sql_magic

Magic functions for using Jupyter Notebook with Apache Spark and a variety of SQL databases.
Apache License 2.0
172 stars 21 forks source link

Expanding sql engines #12

Closed alofgreen closed 5 years ago

alofgreen commented 5 years ago

Would it be beneficial to expand the sql engines used. For example, using pyhive or pyodbc instead of Spark to pull from HIVE.

scottcode commented 5 years ago

sql_magic should already be capable of querying Hive using JDBC/ODBC, thanks to the sqlalchemy integration. I think you'd just have to do sqlalchemy's create_engine using the right prefix for the connection string. If you have installed pyhive then an example connection string is found in the link. It shouldn't require any changes to sql_magic itself.

https://github.com/dropbox/PyHive/issues/61

On Wed, Jan 2, 2019 at 3:36 PM Andy Lofgreen notifications@github.com wrote:

Would it be beneficial to expand the sql engines used. For example, using pyhive or pyodbc instead of Spark to pull from HIVE.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/pivotal-legacy/sql_magic/issues/12, or mute the thread https://github.com/notifications/unsubscribe-auth/AFL8jiXWepCJNH0BMMmcbNod1Um1rPeHks5u_RhcgaJpZM4ZnMbv .

alofgreen commented 5 years ago

Thank you @scottcode this is really helpful. Having some config. challenges with sqlalchemy but this works!

scottcode commented 5 years ago

Glad to hear it!

scottcode commented 5 years ago

Hopefully this resolves the original intent of the issue you posted, @alofgreen, so I'll close it. Just let me know if you feel it needs to be reopened, or if you have a more specific issue/request you are welcome to create a new issue. Thanks.