Skip to content

Commit

Permalink
Use Qubole's proxy for Hive log access (#85)
Browse files Browse the repository at this point in the history
* Use Qubole's proxy for Hive log access

* py3 compatibility
  • Loading branch information
mistercrunch authored Dec 7, 2017
1 parent 663a555 commit 47f8ec2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions superset_config.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"""Config file for Superset"""
import os
from six.moves.urllib.parse import quote

from flask_appbuilder.security.manager import AUTH_OAUTH
from flask_appbuilder.security.sqla.manager import SecurityManager
Expand All @@ -15,6 +16,11 @@

SECRET_KEY = os.getenv("CREDENTIALS_SUPERSET_SECRET_KEY") or 'NOSECRET!'

# Using Qubole's proxy for Hive log access
def qubole_url(url):
return 'https://api.qubole.com/cluster-proxy?encodedUrl=' + quote(url)
TRACKING_URL_TRANSFORMER = qubole_url

if ENV in ('production', 'staging'):
SQLALCHEMY_DATABASE_URI = 'mysql://{user}:{password}@{host}:5432/{database}'.format(
user=os.getenv("CREDENTIALS_SUPERSET_USERNAME"),
Expand Down

0 comments on commit 47f8ec2

Please sign in to comment.