Fixed Time Grain and Added Drill to README (#7635)

* Fixed Time Grain and Added Drill to README

* Capitalization Fix
This commit is contained in:
Charles S. Givre 2019-06-02 09:13:59 -04:00 committed by Ville Brofeldt
parent 1dc17f357c
commit 257c100c59
2 changed files with 11 additions and 10 deletions

View File

@ -112,6 +112,7 @@ Superset can be used to visualize data out of most databases:
* Redshift
* Clickhouse
* Apache Kylin
* Apache Drill
* Google BigQuery
* **more!** look for the availability of a SQLAlchemy dialect for your database
to find out whether it will work with Superset

View File

@ -753,16 +753,16 @@ class DrillEngineSpec(BaseEngineSpec):
time_grain_functions = {
None: '{col}',
'PT1S': "nearestDate({col}, 'SECOND')",
'PT1M': "nearestDate({col}, 'MINUTE')",
'PT15M': "nearestDate({col}, 'QUARTER_HOUR')",
'PT0.5H': "nearestDate({col}, 'HALF_HOUR')",
'PT1H': "nearestDate({col}, 'HOUR')",
'P1D': 'TO_DATE({col})',
'P1W': "nearestDate({col}, 'WEEK_SUNDAY')",
'P1M': "nearestDate({col}, 'MONTH')",
'P0.25Y': "nearestDate({col}, 'QUARTER')",
'P1Y': "nearestDate({col}, 'YEAR')",
'PT1S': "NEARESTDATE({col}, 'SECOND')",
'PT1M': "NEARESTDATE({col}, 'MINUTE')",
'PT15M': "NEARESTDATE({col}, 'QUARTER_HOUR')",
'PT0.5H': "NEARESTDATE({col}, 'HALF_HOUR')",
'PT1H': "NEARESTDATE({col}, 'HOUR')",
'P1D': "NEARESTDATE({col}, 'DAY')",
'P1W': "NEARESTDATE({col}, 'WEEK_SUNDAY')",
'P1M': "NEARESTDATE({col}, 'MONTH')",
'P0.25Y': "NEARESTDATE({col}, 'QUARTER')",
'P1Y': "NEARESTDATE({col}, 'YEAR')",
}
# Returns a function to convert a Unix timestamp in milliseconds to a date