hughhhh commented on a change in pull request #5915: [WIP] Google spreadsheets
URL: 
https://github.com/apache/incubator-superset/pull/5915#discussion_r218881215
 
 

 ##########
 File path: superset/db_engine_specs.py
 ##########
 @@ -1460,6 +1460,39 @@ class DruidEngineSpec(BaseEngineSpec):
     }
 
 
+class GSheetsEngineSpec(BaseEngineSpec):
+    """Engine for Google spreadsheets"""
+    engine = 'gsheets'
+    inner_joins = False
+    allows_subquery = False
+
+    time_grain_functions = {
+        None: '{col}',
+        'PT1S': 'second({col})',
+        'PT1M': 'minute({col})',
+        'PT1H': 'hour({col})',
+        'P1D': 'day({col})',
+        'P1M': 'month({col})',
+        'P0.25Y': 'quarter({col})',
+        'P1Y': 'year({col})',
+    }
+
+    @classmethod
+    def select_star(cls, my_db, table_name, engine, schema=None, limit=100,
 
 Review comment:
   I would put the `limit` var as a class var at the top as `DEFAULT_LIMIT = 
100`

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to