akud opened a new issue #12954: URL: https://github.com/apache/superset/issues/12954
I am migrating from superset version 0.34.0rc2 to 1.0.0. In the old version we use the "Bar Chart" visualization with a sql function in the "Series" box successfully. In the new version, this chart is broken. For example, we have a chart that renders successfully in the old version has a "Series" column of `datepart(year,shipment_month)`. This chart fails in the new version. The data source is in redshift. ### Expected results I expected the bar chart to render correctly. ### Actual results I saw an error message stating `Columns missing in datasource: ['datepart(year,shipment_month)']` #### Screenshots Configuration from the old version:  Successfully rendered chart in the old version:  Configuration in the new version:  Error message in the new version:  #### How to reproduce the bug 1. View a Redshift dataset with a datetime column in Explore mode 2. Choose "Bar Chart" visualization 3. Add "datepart(year, <datetimecolumn>)" as a "Series" entry 4. Click the "Run" button 5. See the error ### Environment (please complete the following information): - superset version: `superset version` ``` Loaded your LOCAL configuration at [/home/superset/superset_config.py] logging was configured successfully INFO:superset.utils.logging_configurator:logging was configured successfully /usr/local/lib/python3.7/site-packages/flask_caching/__init__.py:192: UserWarning: Flask-Caching: CACHE_TYPE is set to null, caching is effectively disabled. "Flask-Caching: CACHE_TYPE is set to null, " -=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Superset 1.0.0 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-= ``` - python version: `python --version` ``` Python 3.7.9 ``` - node.js version: `node -v` ``` v10.23.2 ``` ### Checklist Make sure to follow these steps before submitting your issue - thank you! - [ x] I have checked the superset logs for python stacktraces and included it here as text if there are any. Request log: ``` [2021-02-04 20:29:35 +0000] [63] [DEBUG] POST /superset/explore_json/ DEBUG:parsedatetime:eval - with context - False, False Cache key: f540b9108c6c05f255250f9c259ec9a9 INFO:superset.viz:Cache key: f540b9108c6c05f255250f9c259ec9a9 127.0.0.1 - - [04/Feb/2021:20:29:35 +0000] "POST /superset/explore_json/ HTTP/1.1" 400 981 "http://localhost:8088/superset/explore/?form_data=%7B%22datasource%22%3A%221__table%22%2C%22viz_type%22%3A%22dist_bar%22%2C%22url_params%22%3A%7B%7D%2C%22time_range_endpoints%22%3A%5B%22inclusive%22%2C%22exclusive%22%5D%2C%22granularity_sqla%22%3A%22created_on%22%2C%22time_range%22%3A%22Last+week%22%2C%22metrics%22%3A%5B%22count%22%5D%2C%22adhoc_filters%22%3A%5B%5D%2C%22groupby%22%3A%5B%22datepart%28year%2C+created_on%29%22%5D%2C%22columns%22%3A%5B%5D%2C%22row_limit%22%3A10000%2C%22color_scheme%22%3A%22supersetColors%22%2C%22label_colors%22%3A%7B%7D%2C%22show_legend%22%3Atrue%2C%22y_axis_format%22%3A%22SMART_NUMBER%22%2C%22bottom_margin%22%3A%22auto%22%2C%22x_ticks_layout%22%3A%22auto%22%7D" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36" ``` - [x] I have reproduced the issue with at least the latest released version of superset. - [x ] I have checked the issue tracker for the same issue and I haven't found one similar. ### Additional context We are upgrading to superset 1.0.0 by cloning our taking a snapshot of the metadata db and spinning up a new superset instance on top of it. The failing chart is a copy of a chart that was working in the old version. ---------------------------------------------------------------- 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: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
