[GitHub] JazzChen commented on issue #2950: jdbc+hive in sqlalchemy URI is not working

2017-09-21 Thread git
JazzChen commented on issue #2950: jdbc+hive in sqlalchemy URI is not working
URL: 
https://github.com/apache/incubator-superset/issues/2950#issuecomment-331099646
 
 
   SQLAlchemy URI:
hive://localhost:1
   
   
   I solved this problem by follow reference.  Hoping can help :-)
   
   https://pypi.python.org/pypi/PyHive
   ```
   from sqlalchemy import *
   from sqlalchemy.engine import create_engine
   from sqlalchemy.schema import *
   
   engine = create_engine('hive://localhost:1/default')
   logs = Table('my_awesome_data', MetaData(bind=engine), autoload=True)
   print select([func.count('*')], from_obj=logs).scalar()
   ```
   
   
   Requirements
   
   Install using
   
   pip install pyhive[hive] for the Hive interface and
   pip install pyhive[presto] for the Presto interface.
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] JazzChen commented on issue #2950: jdbc+hive in sqlalchemy URI is not working

2017-09-21 Thread git
JazzChen commented on issue #2950: jdbc+hive in sqlalchemy URI is not working
URL: 
https://github.com/apache/incubator-superset/issues/2950#issuecomment-331099646
 
 
   SQLAlchemy URI:
hive://localhost:1
   
   
   I solved this problem by follow reference.  Hope follow info. could help
   
   https://pypi.python.org/pypi/PyHive
   ```
   from sqlalchemy import *
   from sqlalchemy.engine import create_engine
   from sqlalchemy.schema import *
   
   engine = create_engine('hive://localhost:1/default')
   logs = Table('my_awesome_data', MetaData(bind=engine), autoload=True)
   print select([func.count('*')], from_obj=logs).scalar()
   ```
   
   
   Requirements
   
   Install using
   
   pip install pyhive[hive] for the Hive interface and
   pip install pyhive[presto] for the Presto interface.
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] JazzChen commented on issue #2950: jdbc+hive in sqlalchemy URI is not working

2017-09-21 Thread git
JazzChen commented on issue #2950: jdbc+hive in sqlalchemy URI is not working
URL: 
https://github.com/apache/incubator-superset/issues/2950#issuecomment-331099646
 
 
   SQLAlchemy URI:
hive://localhost:1
   
   
   I solved this problem by follow reference.  Hope follow info. could help
   
   https://pypi.python.org/pypi/PyHive
   
   from sqlalchemy import *
   from sqlalchemy.engine import create_engine
   from sqlalchemy.schema import *
   # Hive
   engine = create_engine('hive://localhost:1/default')
   logs = Table('my_awesome_data', MetaData(bind=engine), autoload=True)
   print select([func.count('*')], from_obj=logs).scalar()
   
   
   
   Requirements
   
   Install using
   
   pip install pyhive[hive] for the Hive interface and
   pip install pyhive[presto] for the Presto interface.
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services