Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Superset and SQLLab - error with Preview for the table #11

Closed
darylerwin opened this issue Feb 11, 2018 · 6 comments
Closed

Superset and SQLLab - error with Preview for the table #11

darylerwin opened this issue Feb 11, 2018 · 6 comments

Comments

@darylerwin
Copy link

Select the dataset.tablename from the SQLLab drop downs.
The supeset UI returns "cannot import name Row" on the Preview tab.

The log returns the following:

2018-02-11 14:07:04,225:DEBUG:root:[stats_logger] (incr) table
2018-02-11 14:07:04,240:ERROR:root:No JSON object could be decoded
2018-02-11 14:07:04,240:INFO:root:Database.get_sqla_engine(). Masked URL: bigquery://production-bigdata/
2018-02-11 14:07:04,399:DEBUG:urllib3.util.retry:Converted retries value: 3 -> Retry(total=3, connect=None, read=None, redirect=None, status=None)
2018-02-11 14:07:04,402:DEBUG:google.auth.transport.requests:Making request: POST https://accounts.google.com/o/oauth2/token
2018-02-11 14:07:04,406:DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): accounts.google.com
2018-02-11 14:07:04,446:ERROR:root:No JSON object could be decoded
2018-02-11 14:07:04,447:INFO:root:Database.get_sqla_engine(). Masked URL: bigquery://production-bigdata/
2018-02-11 14:07:04,452:DEBUG:urllib3.util.retry:Converted retries value: 3 -> Retry(total=3, connect=None, read=None, redirect=None, status=None)
2018-02-11 14:07:04,459:DEBUG:google.auth.transport.requests:Making request: POST https://accounts.google.com/o/oauth2/token
2018-02-11 14:07:04,463:DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): accounts.google.com
2018-02-11 14:07:04,481:DEBUG:urllib3.connectionpool:https://accounts.google.com:443 "POST /o/oauth2/token HTTP/1.1" 200 None
2018-02-11 14:07:04,484:DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): www.googleapis.com
2018-02-11 14:07:04,502:DEBUG:root:[stats_logger] (incr) extra_table_metadata
2018-02-11 14:07:04,539:DEBUG:urllib3.connectionpool:https://accounts.google.com:443 "POST /o/oauth2/token HTTP/1.1" 200 None
2018-02-11 14:07:04,541:DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): www.googleapis.com
2018-02-11 14:07:04,619:DEBUG:urllib3.connectionpool:https://www.googleapis.com:443 "GET /bigquery/v2/projects/production-bigdata/datasets/visualizations/tables/REVENUE_RPT HTTP/1.1" 200 None
2018-02-11 14:07:04,621:ERROR:root:No JSON object could be decoded
2018-02-11 14:07:04,621:INFO:root:Database.get_sqla_engine(). Masked URL: bigquery://production-bigdata/
2018-02-11 14:07:04,634:DEBUG:urllib3.util.retry:Converted retries value: 3 -> Retry(total=3, connect=None, read=None, redirect=None, status=None)
2018-02-11 14:07:04,636:DEBUG:google.auth.transport.requests:Making request: POST https://accounts.google.com/o/oauth2/token
2018-02-11 14:07:04,637:DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): accounts.google.com
2018-02-11 14:07:04,654:DEBUG:urllib3.connectionpool:https://www.googleapis.com:443 "GET /bigquery/v2/projects/production-bigdata/datasets HTTP/1.1" 200 None
2018-02-11 14:07:04,736:DEBUG:urllib3.connectionpool:https://accounts.google.com:443 "POST /o/oauth2/token HTTP/1.1" 200 None
2018-02-11 14:07:04,738:DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): www.googleapis.com
2018-02-11 14:07:04,827:DEBUG:urllib3.connectionpool:https://www.googleapis.com:443 "GET /bigquery/v2/projects/production-bigdata/datasets/visualizations/tables HTTP/1.1" 200 None
2018-02-11 14:07:04,862:DEBUG:urllib3.connectionpool:https://www.googleapis.com:443 "GET /bigquery/v2/projects/production-bigdata/datasets/visualizations/tables/REVENUE_RPT HTTP/1.1" 200 None
2018-02-11 14:07:04,863:ERROR:root:No JSON object could be decoded
2018-02-11 14:07:04,864:INFO:root:Database.get_sqla_engine(). Masked URL: bigquery://production-bigdata/
2018-02-11 14:07:04,874:ERROR:root:No JSON object could be decoded
2018-02-11 14:07:04,879:INFO:root:Database.get_sqla_engine(). Masked URL: bigquery://production-bigdata/
2018-02-11 14:07:04,888:ERROR:root:No JSON object could be decoded
2018-02-11 14:07:04,889:INFO:root:Database.get_sqla_engine(). Masked URL: bigquery://production-bigdata/
2018-02-11 14:07:04,898:ERROR:root:No JSON object could be decoded
2018-02-11 14:07:04,904:ERROR:root:No JSON object could be decoded
2018-02-11 14:07:04,904:INFO:root:Database.get_sqla_engine(). Masked URL: bigquery://production-bigdata/
2018-02-11 14:07:04,914:DEBUG:urllib3.util.retry:Converted retries value: 3 -> Retry(total=3, connect=None, read=None, redirect=None, status=None)
2018-02-11 14:07:04,919:DEBUG:google.auth.transport.requests:Making request: POST https://accounts.google.com/o/oauth2/token
2018-02-11 14:07:04,923:DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): accounts.google.com
2018-02-11 14:07:04,999:DEBUG:urllib3.connectionpool:https://accounts.google.com:443 "POST /o/oauth2/token HTTP/1.1" 200 None
2018-02-11 14:07:05,001:DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): www.googleapis.com
2018-02-11 14:07:05,123:DEBUG:urllib3.connectionpool:https://www.googleapis.com:443 "GET /bigquery/v2/projects/production-bigdata/datasets/visualizations/tables/REVENUE_RPT HTTP/1.1" 200 None
2018-02-11 14:07:05,263:ERROR:root:No JSON object could be decoded
2018-02-11 14:07:05,263:INFO:root:Database.get_sqla_engine(). Masked URL: bigquery://production-bigdata/
...
2018-02-11 14:07:05,458:ERROR:root:No JSON object could be decoded
2018-02-11 14:07:05,458:INFO:root:Database.get_sqla_engine(). Masked URL: bigquery://production-bigdata/
/home/derwin/venv/local/lib/python2.7/site-packages/sqlalchemy/sql/elements.py:4360: SAWarning: Textual column expression '`DAY`' should be explicitly declared with text('`DAY`'), or use literal_column('`DAY`') for more specificity (this warning may be suppressed after 10 occurrences)
  if guess_is_literal else "column"
/home/derwin/venv/local/lib/python2.7/site-packages/sqlalchemy/sql/elements.py:4360: SAWarning: Textual column expression '`CUSTOMER`' should be explicitly declared with text('`CUSTOMER`'), or use literal_column('`CUSTOMER`') for more specificity (this warning may be suppressed after 10 occurrences)
  if guess_is_literal else "column"
/home/derwin/venv/local/lib/python2.7/site-packages/sqlalchemy/sql/elements.py:4360: SAWarning: Textual column expression '`CAMPAIGN_NAME`' should be explicitly declared with text('`CAMPAIGN_NAME`'), or use literal_column('`CAMPAIGN_NAME`') for more specificity (this warning may be suppressed after 10 occurrences)
  if guess_is_literal else "column"
/home/derwin/venv/local/lib/python2.7/site-packages/sqlalchemy/sql/elements.py:4360: SAWarning: Textual column expression '`LINE_ITEM_ID`' should be explicitly declared with text('`LINE_ITEM_ID`'), or use literal_column('`LINE_ITEM_ID`') for more specificity (this warning may be suppressed after 10 occurrences)
  if guess_is_literal else "column"
/home/derwin/venv/local/lib/python2.7/site-packages/sqlalchemy/sql/elements.py:4360: SAWarning: Textual column expression '`REGION_PLACEHOLDER`' should be explicitly declared with text('`REGION_PLACEHOLDER`'), or use literal_column('`REGION_PLACEHOLDER`') for more specificity (this warning may be suppressed after 10 occurrences)
  if guess_is_literal else "column"
/home/derwin/venv/local/lib/python2.7/site-packages/sqlalchemy/sql/elements.py:4360: SAWarning: Textual column expression '`STATUS_FINAL`' should be explicitly declared with text('`STATUS_FINAL`'), or use literal_column('`STATUS_FINAL`') for more specificity (this warning may be suppressed after 10 occurrences)
  if guess_is_literal else "column"
/home/derwin/venv/local/lib/python2.7/site-packages/sqlalchemy/sql/elements.py:4360: SAWarning: Textual column expression '`RATE_USD`' should be explicitly declared with text('`RATE_USD`'), or use literal_column('`RATE_USD`') for more specificity (this warning may be suppressed after 10 occurrences)
  if guess_is_literal else "column"
/home/derwin/venv/local/lib/python2.7/site-packages/sqlalchemy/sql/elements.py:4360: SAWarning: Textual column expression '`COUNTRY`' should be explicitly declared with text('`COUNTRY`'), or use literal_column('`COUNTRY`') for more specificity (this warning may be suppressed after 10 occurrences)
  if guess_is_literal else "column"
/home/derwin/venv/local/lib/python2.7/site-packages/sqlalchemy/sql/elements.py:4360: SAWarning: Textual column expression '`COST_BASIS`' should be explicitly declared with text('`COST_BASIS`'), or use literal_column('`COST_BASIS`') for more specificity (this warning may be suppressed after 10 occurrences)
  if guess_is_literal else "column"
/home/derwin/venv/local/lib/python2.7/site-packages/sqlalchemy/sql/elements.py:4360: SAWarning: Textual column expression '`ADS_SERVED`' should be explicitly declared with text('`ADS_SERVED`'), or use literal_column('`ADS_SERVED`') for more specificity (this warning may be suppressed after 10 occurrences)
  if guess_is_literal else "column"
2018-02-11 14:07:05,473:ERROR:root:No JSON object could be decoded
2018-02-11 14:07:05,475:INFO:root:Database.get_sqla_engine(). Masked URL: bigquery://production-bigdata/
2018-02-11 14:07:06,588:DEBUG:root:[stats_logger] (incr) sql_json
2018-02-11 14:07:06,604:INFO:root:Parsing with sqlparse statement SELECT `DAY`,
       `CUSTOMER`,
       `CAMPAIGN_NAME`,
       `LINE_ITEM_ID`,
       `AD_NAME`,
       `REGION_PLACEHOLDER`,
       `STATUS_FINAL`,
       `ORDER_NAME`,
       `RATE__ORIGINAL_CURRENCY_`,
       `RATE_USD`,
       `COUNTRY`,
       `PLATFORM`,
       `CURRENCY_ORIGINAL`,
       `COST_BASIS`,
       `EXCHANGERATE`,
       `START_DATE`,
       `END_DATE`,
       `AD_TYPE`,
       `ADS_SERVED`,
       `IMPRESSIONS`,
       `CLICKS`,
       `ACCEPTS`,
       `INSTALLS`,
       `REVENUE`,
       `IMP_RATIO`,
       `CTR`,
       `CTI`,
       `ECPM`,
       `ORDER_SALESPERSON`,
       `RATE_DISCOUNT`,
       `BOOKED_IMPRESSIONS`,
       `bq_load_timestamp`
FROM visualizations.REVENUE_RPT
LIMIT 100
2018-02-11 14:07:07,164:INFO:root:Triggering query_id: 19
2018-02-11 14:07:07,208:INFO:root:Parsing with sqlparse statement SELECT `DAY`,
       `CUSTOMER`,
       `CAMPAIGN_NAME`,
       `LINE_ITEM_ID`,
       `AD_NAME`,
       `REGION_PLACEHOLDER`,
       `STATUS_FINAL`,
       `ORDER_NAME`,
       `RATE__ORIGINAL_CURRENCY_`,
       `RATE_USD`,
       `COUNTRY`,
       `PLATFORM`,
       `CURRENCY_ORIGINAL`,
       `COST_BASIS`,
       `EXCHANGERATE`,
       `START_DATE`,
       `END_DATE`,
       `AD_TYPE`,
       `ADS_SERVED`,
       `IMPRESSIONS`,
       `CLICKS`,
       `ACCEPTS`,
       `INSTALLS`,
       `REVENUE`,
       `IMP_RATIO`,
       `CTR`,
       `CTI`,
       `ECPM`,
       `ORDER_SALESPERSON`,
       `RATE_DISCOUNT`,
       `BOOKED_IMPRESSIONS`,
       `bq_load_timestamp`
FROM visualizations.REVENUE_RPT
LIMIT 100
2018-02-11 14:07:07,264:INFO:root:Set query to 'running'
2018-02-11 14:07:07,307:ERROR:root:No JSON object could be decoded
2018-02-11 14:07:07,308:INFO:root:Database.get_sqla_engine(). Masked URL: bigquery://production-bigdata/
2018-02-11 14:07:07,313:INFO:root:Running query: 
SELECT `DAY`,
       `CUSTOMER`,
       `CAMPAIGN_NAME`,
       `LINE_ITEM_ID`,
       `AD_NAME`,
       `REGION_PLACEHOLDER`,
       `STATUS_FINAL`,
       `ORDER_NAME`,
       `RATE__ORIGINAL_CURRENCY_`,
       `RATE_USD`,
       `COUNTRY`,
       `PLATFORM`,
       `CURRENCY_ORIGINAL`,
       `COST_BASIS`,
       `EXCHANGERATE`,
       `START_DATE`,
       `END_DATE`,
       `AD_TYPE`,
       `ADS_SERVED`,
       `IMPRESSIONS`,
       `CLICKS`,
       `ACCEPTS`,
       `INSTALLS`,
       `REVENUE`,
       `IMP_RATIO`,
       `CTR`,
       `CTI`,
       `ECPM`,
       `ORDER_SALESPERSON`,
       `RATE_DISCOUNT`,
       `BOOKED_IMPRESSIONS`,
       `bq_load_timestamp`
FROM visualizations.REVENUE_RPT
LIMIT 100
2018-02-11 14:07:07,313:INFO:root:SELECT `DAY`,
       `CUSTOMER`,
       `CAMPAIGN_NAME`,
       `LINE_ITEM_ID`,
       `AD_NAME`,
       `REGION_PLACEHOLDER`,
       `STATUS_FINAL`,
       `ORDER_NAME`,
       `RATE__ORIGINAL_CURRENCY_`,
       `RATE_USD`,
       `COUNTRY`,
       `PLATFORM`,
       `CURRENCY_ORIGINAL`,
       `COST_BASIS`,
       `EXCHANGERATE`,
       `START_DATE`,
       `END_DATE`,
       `AD_TYPE`,
       `ADS_SERVED`,
       `IMPRESSIONS`,
       `CLICKS`,
       `ACCEPTS`,
       `INSTALLS`,
       `REVENUE`,
       `IMP_RATIO`,
       `CTR`,
       `CTI`,
       `ECPM`,
       `ORDER_SALESPERSON`,
       `RATE_DISCOUNT`,
       `BOOKED_IMPRESSIONS`,
       `bq_load_timestamp`
FROM visualizations.REVENUE_RPT
LIMIT 100
2018-02-11 14:07:07,314:DEBUG:urllib3.util.retry:Converted retries value: 3 -> Retry(total=3, connect=None, read=None, redirect=None, status=None)
2018-02-11 14:07:07,316:DEBUG:google.auth.transport.requests:Making request: POST https://accounts.google.com/o/oauth2/token
2018-02-11 14:07:07,317:DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): accounts.google.com
2018-02-11 14:07:07,386:DEBUG:urllib3.connectionpool:https://accounts.google.com:443 "POST /o/oauth2/token HTTP/1.1" 200 None
2018-02-11 14:07:07,388:DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): www.googleapis.com
2018-02-11 14:07:07,541:DEBUG:root:[stats_logger] (incr) queries
2018-02-11 14:07:07,792:DEBUG:urllib3.connectionpool:https://www.googleapis.com:443 "POST /bigquery/v2/projects/production-bigdata/jobs HTTP/1.1" 200 None
2018-02-11 14:07:09,042:DEBUG:urllib3.connectionpool:https://www.googleapis.com:443 "GET /bigquery/v2/projects/production-bigdata/queries/a71e3fcf-9970-4a64-845b-74ded5268989?maxResults=0 HTTP/1.1" 200 None
2018-02-11 14:07:09,145:DEBUG:urllib3.connectionpool:https://www.googleapis.com:443 "GET /bigquery/v2/projects/production-bigdata/jobs/a71e3fcf-9970-4a64-845b-74ded5268989 HTTP/1.1" 200 None
2018-02-11 14:07:09,147:INFO:root:Handling cursor
2018-02-11 14:07:09,162:INFO:root:Fetching data: {u'changedOn': datetime.datetime(2018, 2, 11, 14, 7, 7), u'tempTable': None, u'userId': 1L, u'executedSql': u'SELECT `DAY`,\n       `CUSTOMER`,\n       `CAMPAIGN_NAME`,\n       `LINE_ITEM_ID`,\n       `AD_NAME`,\n       `REGION_PLACEHOLDER`,\n       `STATUS_FINAL`,\n       `ORDER_NAME`,\n       `RATE__ORIGINAL_CURRENCY_`,\n       `RATE_USD`,\n       `COUNTRY`,\n       `PLATFORM`,\n       `CURRENCY_ORIGINAL`,\n       `COST_BASIS`,\n       `EXCHANGERATE`,\n       `START_DATE`,\n       `END_DATE`,\n       `AD_TYPE`,\n       `ADS_SERVED`,\n       `IMPRESSIONS`,\n       `CLICKS`,\n       `ACCEPTS`,\n       `INSTALLS`,\n       `REVENUE`,\n       `IMP_RATIO`,\n       `CTR`,\n       `CTI`,\n       `ECPM`,\n       `ORDER_SALESPERSON`,\n       `RATE_DISCOUNT`,\n       `BOOKED_IMPRESSIONS`,\n       `bq_load_timestamp`\nFROM visualizations.REVENUE_RPT\nLIMIT 100', u'ctas': False, u'tab': u'', u'sqlEditorId': u'', u'id': u'HJfzCTaUM', u'changed_on': '2018-02-11T14:07:07', u'rows': None, u'endDttm': None, u'limit_reached': False, u'state': u'running', u'progress': 0L, u'schema': None, u'dbId': 3L, u'errorMessage': None, u'db': u'BigQuery', u'trackingUrl': None, u'user': u'admin', u'sql': u'SELECT `DAY`,\n       `CUSTOMER`,\n       `CAMPAIGN_NAME`,\n       `LINE_ITEM_ID`,\n       `AD_NAME`,\n       `REGION_PLACEHOLDER`,\n       `STATUS_FINAL`,\n       `ORDER_NAME`,\n       `RATE__ORIGINAL_CURRENCY_`,\n       `RATE_USD`,\n       `COUNTRY`,\n       `PLATFORM`,\n       `CURRENCY_ORIGINAL`,\n       `COST_BASIS`,\n       `EXCHANGERATE`,\n       `START_DATE`,\n       `END_DATE`,\n       `AD_TYPE`,\n       `ADS_SERVED`,\n       `IMPRESSIONS`,\n       `CLICKS`,\n       `ACCEPTS`,\n       `INSTALLS`,\n       `REVENUE`,\n       `IMP_RATIO`,\n       `CTR`,\n       `CTI`,\n       `ECPM`,\n       `ORDER_SALESPERSON`,\n       `RATE_DISCOUNT`,\n       `BOOKED_IMPRESSIONS`,\n       `bq_load_timestamp`\nFROM visualizations.REVENUE_RPT\nLIMIT 100', u'startDttm': Decimal('1518358027090.300000'), u'limit': 1000000L, u'serverId': 19L, u'resultsKey': None}
2018-02-11 14:07:09,162:DEBUG:root:DEBUG 2   fetch_data ======================
2018-02-11 14:07:09,323:DEBUG:urllib3.connectionpool:https://www.googleapis.com:443 "GET /bigquery/v2/projects/production-bigdata/datasets/_502a1d151dbcdc9998f3fc57071106c6e473a198/tables/anonda85ab5ab9617bb315b69f60a90a18b3ed9c7251/data?selectedFields=DAY%2CCUSTOMER%2CCAMPAIGN_NAME%2CLINE_ITEM_ID%2CAD_NAME%2CREGION_PLACEHOLDER%2CSTATUS_FINAL%2CORDER_NAME%2CRATE__ORIGINAL_CURRENCY_%2CRATE_USD%2CCOUNTRY%2CPLATFORM%2CCURRENCY_ORIGINAL%2CCOST_BASIS%2CEXCHANGERATE%2CSTART_DATE%2CEND_DATE%2CAD_TYPE%2CADS_SERVED%2CIMPRESSIONS%2CCLICKS%2CACCEPTS%2CINSTALLS%2CREVENUE%2CIMP_RATIO%2CCTR%2CCTI%2CECPM%2CORDER_SALESPERSON%2CRATE_DISCOUNT%2CBOOKED_IMPRESSIONS%2Cbq_load_timestamp HTTP/1.1" 200 None
2018-02-11 14:07:09,348:ERROR:root:cannot import name Row
Traceback (most recent call last):
  File "/home/derwin/venv/local/lib/python2.7/site-packages/superset/sql_lab.py", line 192, in execute_sql
    data = db_engine_spec.fetch_data(cursor, query.limit)
  File "/home/derwin/venv/local/lib/python2.7/site-packages/superset/db_engine_specs.py", line 1204, in fetch_data
    from google.cloud.bigquery._helpers import Row  # pylint: disable=import-error
ImportError: cannot import name Row
2018-02-11 14:07:09,547:DEBUG:root:[stats_logger] (incr) queries
@darylerwin
Copy link
Author

I think the fix is:
db_engine_specs.py
A slight change from your code..

from google.cloud.bigquery import Row # pylint: disable=import-error

@mxmzdlv
Copy link
Contributor

mxmzdlv commented Feb 11, 2018

Thanks. This is something that will need to be done in the superset code as there is a direct import from Google's DBAPI library. For now as a workaround you can revert back to the older pybigquery and older google-cloud-bigquery dependency:

pip install pybigquery==0.2.5
pip install google-cloud-bigquery==0.28.0

Should fix all issues.

@mxmzdlv
Copy link
Contributor

mxmzdlv commented Feb 11, 2018

Pushed the fix
apache/superset#4404

@darylerwin
Copy link
Author

Well I messed something up .. SQL Lab trying to preview results or run a query I get.
(could I have a mismatch of os or python versions?)

2018-02-12 01:45:40,480:ERROR:root:Shape of passed values is (1, 100), indices imply (13, 100)
Traceback (most recent call last):
  File "/home/derwin/venv/local/lib/python2.7/site-packages/superset/views/core.py", line 2188, in sql_json
    query_id=query_id, return_results=True)
  File "/home/derwin/venv/local/lib/python2.7/site-packages/celery/local.py", line 191, in __call__
    return self._get_current_object()(*a, **kw)
  File "/home/derwin/venv/local/lib/python2.7/site-packages/celery/app/task.py", line 380, in __call__
    return self.run(*args, **kwargs)
  File "/home/derwin/venv/local/lib/python2.7/site-packages/superset/sql_lab.py", line 94, in get_sql_results
    ctask, query_id, return_results, store_results, user_name)
  File "/home/derwin/venv/local/lib/python2.7/site-packages/superset/sql_lab.py", line 226, in execute_sql
    pd.DataFrame(list(data), columns=column_names))
  File "/home/derwin/venv/local/lib/python2.7/site-packages/pandas/core/frame.py", line 330, in __init__
    copy=copy)
  File "/home/derwin/venv/local/lib/python2.7/site-packages/pandas/core/frame.py", line 483, in _init_ndarray
    return create_block_manager_from_blocks([values], [columns, index])
  File "/home/derwin/venv/local/lib/python2.7/site-packages/pandas/core/internals.py", line 4303, in create_block_manager_from_blocks
    construction_error(tot_items, blocks[0].shape[1:], axes, e)
  File "/home/derwin/venv/local/lib/python2.7/site-packages/pandas/core/internals.py", line 4280, in construction_error
    passed, implied))
ValueError: Shape of passed values is (1, 100), indices imply (13, 100)

@mxmzdlv
Copy link
Contributor

mxmzdlv commented Feb 12, 2018

Are you selecting any fields with RECORD type? That might be causing an issue. Try flattening the query, e.g. instead of SELECT record, try SELECT record.field1, record.field2

@darylerwin
Copy link
Author

No. What I did to fix this was grab the latest sql_lab.py code from superset. It changes how it reads the data ie. pd.Dataframe(list(data)...
Will close this as you have addressed the issue and it is solved on my side too..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants