mirror of
https://github.com/apache/superset.git
synced 2024-09-12 08:39:45 -04:00
19 lines
420 B
Python
19 lines
420 B
Python
|
import config
|
||
|
from datetime import timedelta
|
||
|
|
||
|
since_l = {
|
||
|
'1hour': timedelta(hours=1),
|
||
|
'1day': timedelta(days=1),
|
||
|
'7days': timedelta(days=7),
|
||
|
'28days': timedelta(days=28),
|
||
|
'all': timedelta(days=365*100)
|
||
|
}
|
||
|
|
||
|
def get_pydruid_client():
|
||
|
from pydruid import client
|
||
|
return client.PyDruid(
|
||
|
"http://{0}:{1}/".format(config.DRUID_HOST, config.DRUID_PORT),
|
||
|
config.DRUID_BASE_ENDPOINT)
|
||
|
|
||
|
|