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/05/25 13:40:07 UTC

[GitHub] zyclonite opened a new issue #5082: viz tries to convert to number for a calculated (db function) column which is string

zyclonite opened a new issue #5082: viz tries to convert to number for a calculated (db function) column which is string
URL: https://github.com/apache/incubator-superset/issues/5082
 
 
   ### Superset version
   0.25.5
   
   ### Expected results
   Table View shows my query data for the following clickhouse (sqlalchemy) query
   ```
   SELECT EventID AS EventID,
          COUNT(*) AS count,
          dictGetString('events', 'Name', toUInt64(EventID)) AS EventName,
          sum(Value) AS TotalValue,
   FROM production.fact_game
   WHERE EventID == 1000
   GROUP BY EventID
   ORDER BY TotalValue DESC
   LIMIT 50000;
   ```
   
   ### Actual results
       Unable to parse string "EventNameABC" at position 0
   is displayed with the following stacktrage
   ```
   Traceback (most recent call last):
     File "pandas/_libs/src/inference.pyx", line 1125, in pandas._libs.lib.maybe_convert_numeric
   ValueError: Unable to parse string "EventNameABC"
   
   During handling of the above exception, another exception occurred:
   
   Traceback (most recent call last):
     File "/usr/local/lib/python3.6/site-packages/superset/viz.py", line 364, in get_df_payload
       df = self.get_df(query_obj)
     File "/usr/local/lib/python3.6/site-packages/superset/viz.py", line 187, in get_df
       self.df_metrics_to_num(df, query_obj.get('metrics') or [])
     File "/usr/local/lib/python3.6/site-packages/superset/viz.py", line 199, in df_metrics_to_num
       df[col] = pd.to_numeric(df[col])
     File "/usr/local/lib/python3.6/site-packages/pandas/core/tools/numeric.py", line 133, in to_numeric
       coerce_numeric=coerce_numeric)
     File "pandas/_libs/src/inference.pyx", line 1158, in pandas._libs.lib.maybe_convert_numeric
   ValueError: Unable to parse string "EventNameABC" at position 0
   ```
   
   ### Potential cause
   could be related to the following PR/FIX https://github.com/apache/incubator-superset/pull/4726
   
   
   

----------------------------------------------------------------
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