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 2021/02/08 18:34:48 UTC

[GitHub] [superset] akud commented on issue #12954: Error Upgrading Bar Charts with SQL Functions in Series to Superset 1.0.0

akud commented on issue #12954:
URL: https://github.com/apache/superset/issues/12954#issuecomment-775354247


   Hi @junlincc the column is a DATE column. Here is an obfuscated version of the query produced by the old version of superset:
   
   ```
   SELECT version AS version,
                     (datepart(year, shipment_month)) AS "datepart(year,shipment_month)",
                     product_group AS product_group,
                     sum(net_shipped_amount_usd) AS "sum(net_shipped_amount_usd)"
   FROM
     (... Data Source custom SQL ...)
   GROUP BY version, (datepart(year, shipment_month)), product_group
   ORDER BY "sum(net_shipped_amount_usd)" DESC
   LIMIT 1000;
   ```
   
   For anyone stumbling across this, I was able to solve the problem in the UI by editing the datasource and adding a "Derived Column" with the sql function, then using that in the chart Series.
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



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