You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2018/08/15 00:41:16 UTC

[GitHub] mistercrunch commented on a change in pull request #5632: Fetch a batch of rows from bigquery

mistercrunch commented on a change in pull request #5632: Fetch a batch of rows from bigquery
URL: https://github.com/apache/incubator-superset/pull/5632#discussion_r210145484
 
 

 ##########
 File path: superset/db_engine_specs.py
 ##########
 @@ -1367,6 +1367,15 @@ class BQEngineSpec(BaseEngineSpec):
     As contributed by @mxmzdlv on issue #945"""
     engine = 'bigquery'
 
+    """
+    https://www.python.org/dev/peps/pep-0249/#arraysize
+    raw_connections bypass the pybigquery query execution context and deal with
+    raw dbapi connection directly.
+    If this value is not set, the default value is set to 1, as described here,
+    https://googlecloudplatform.github.io/google-cloud-python/latest/_modules/google/cloud/bigquery/dbapi/cursor.html#Cursor
+    """
+    arraysize = 5000
 
 Review comment:
   I like the idea of setting the arraysize as a class attr, that would be the expected way to set it in derived classes. Maybe add those two lines in `BaseEngineSpec.fetch_data`:
   ```python
   if cls.arraysize:
       cursor.arraysize = cls.arraysize
   ```
   and set `arraysize = None` in the base class

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org