superset: Event flow chart does not display Time section in configuration
When creating an ‘event flow’ chart in superset, the section labeled ‘Time’ is not displayed. This prevents the ‘time column’ select element from rendering, and prevents configuration of the chart. Attempts to configure a chart without filling in this section result in the error message:
Unexpected error Datetime column not provided as part table configuration and is required by this type of chart
Edit: After a bit of investigation, it appears that the time configuration section is rendered by the shared legacyRegularTime section, which is disabled when GENERIC_CHART_AXES is set. This suggests that this is therefor intended behaviour, and the bug instead lies with the propagation of the generic configuration through to the get_sqla_query function.
Charts created in an earlier version of superset (2.0.0) can be imported, and will be rendered successfully, however they result in the same error as above if edited.
How to reproduce the bug
- Spin up and configure a superset docker container (I’m using 3.0.2)
- Import the examples with
docker exec -it superset superset load_examples - Log in to superset
- Click on ‘Charts’
- Click on ‘+ Chart’
- Click on ‘Flow’ > ‘Event Flow’
- Select the ‘Channels’ data set
- Click ‘Create new chart’
- The ‘Time’ section will not be visible
- If you attempt to configure the remainder of the chart, selecting
topic__creatorfor ‘Entity id’, andnamefor ‘Event names’ then click ‘Create chart’ you will see:
Unexpected error Datetime column not provided as part table configuration and is required by this type of chart
The same set of actions will work for Superset 2.0.0
Expected results
~I expect to have the ability to select created under a ‘Time Column’ select box, which will allow an event flow chart to be created. This chart will show the flow of channel creation per topic__creator.~
I expect to be able to create an event flow chart. In the absence of an ability to explicitly configure time column settings, then the generic configuration should behave as intended.
Actual results
The time section of the configuration form is not rendered, preventing the selection of a Time column. This results in an error message when an attempt is made to create the chart.
Screenshots
Attached are screenshots of the process in superset 3.0.2, and superset 2.0.0
Superset 2.0.0
Superset 3.0.2
Environment
I’m using the container apache/supereset:3.0.2
- browser type and version: Vivaldi 6.4.3160.47 (Chromium)
- superset version: 3.0.2
- python version: Python 3.9.18
- node.js version:
node -v(From within the docker container I get /bin/sh: 9: node: not found) - any feature flags active: No (Although GENERIC_CHART_AXES is on by default, and appears to be key to this behaviour)
Checklist
Make sure to follow these steps before submitting your issue - thank you!
- I have checked the superset logs for python stacktraces and included it here as text if there are any.
See some issues within the docker logs:
2023-12-05 14:41:46 192.168.65.1 - - [05/Dec/2023:14:41:46 +0000] "GET /api/v1/me/ HTTP/1.1" 200 150 "http://localhost:8082/explore/?form_data_key=DQHTkqDFXtffWzPKYWWOvObk4We9PsomKjRATiDGy3sphErNjopkXo5Q-B40XmeH&viz_type=event_flow&datasource=20__table&datasource_id=20&datasource_type=table" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36"
2023-12-05 14:41:53 192.168.65.1 - - [05/Dec/2023:14:41:53 +0000] "GET /explore/?form_data_key=DQHTkqDFXtffWzPKYWWOvObk4We9PsomKjRATiDGy3sphErNjopkXo5Q-B40XmeH&viz_type=event_flow&datasource=20__table&datasource_id=20&datasource_type=table HTTP/1.1" 200 49991 "http://localhost:8082/superset/welcome/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36"
2023-12-05 14:41:53 HTTPException
2023-12-05 14:41:53 Traceback (most recent call last):
2023-12-05 14:41:53 File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1823, in full_dispatch_request
2023-12-05 14:41:53 rv = self.dispatch_request()
2023-12-05 14:41:53 File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1799, in dispatch_request
2023-12-05 14:41:53 return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
2023-12-05 14:41:53 File "/usr/local/lib/python3.9/site-packages/flask/scaffold.py", line 331, in send_static_file
2023-12-05 14:41:53 return send_from_directory(
2023-12-05 14:41:53 File "/usr/local/lib/python3.9/site-packages/flask/helpers.py", line 590, in send_from_directory
2023-12-05 14:41:53 return werkzeug.utils.send_from_directory( # type: ignore[return-value]
2023-12-05 14:41:53 File "/usr/local/lib/python3.9/site-packages/werkzeug/utils.py", line 578, in send_from_directory
2023-12-05 14:41:53 raise NotFound()
2023-12-05 14:41:53 werkzeug.exceptions.NotFound: 404 Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.
2023-12-05 14:41:53 2023-12-05 14:41:53,194:WARNING:superset.views.base:HTTPException
2023-12-05 14:41:53 Traceback (most recent call last):
2023-12-05 14:41:53 File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1823, in full_dispatch_request
2023-12-05 14:41:53 rv = self.dispatch_request()
2023-12-05 14:41:53 File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1799, in dispatch_request
2023-12-05 14:41:53 return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
2023-12-05 14:41:53 File "/usr/local/lib/python3.9/site-packages/flask/scaffold.py", line 331, in send_static_file
2023-12-05 14:41:53 return send_from_directory(
2023-12-05 14:41:53 File "/usr/local/lib/python3.9/site-packages/flask/helpers.py", line 590, in send_from_directory
2023-12-05 14:41:53 return werkzeug.utils.send_from_directory( # type: ignore[return-value]
2023-12-05 14:41:53 File "/usr/local/lib/python3.9/site-packages/werkzeug/utils.py", line 578, in send_from_directory
2023-12-05 14:41:53 raise NotFound()
2023-12-05 14:41:53 werkzeug.exceptions.NotFound: 404 Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.
2023-12-05 14:41:53 HTTPException
2023-12-05 14:41:53 Traceback (most recent call last):
2023-12-05 14:41:53 File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1823, in full_dispatch_request
2023-12-05 14:41:53 rv = self.dispatch_request()
2023-12-05 14:41:53 File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1799, in dispatch_request
2023-12-05 14:41:53 return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
2023-12-05 14:41:53 File "/usr/local/lib/python3.9/site-packages/flask/scaffold.py", line 331, in send_static_file
2023-12-05 14:41:53 return send_from_directory(
2023-12-05 14:41:53 File "/usr/local/lib/python3.9/site-packages/flask/helpers.py", line 590, in send_from_directory
2023-12-05 14:41:53 return werkzeug.utils.send_from_directory( # type: ignore[return-value]
2023-12-05 14:41:53 File "/usr/local/lib/python3.9/site-packages/werkzeug/utils.py", line 578, in send_from_directory
2023-12-05 14:41:53 raise NotFound()
2023-12-05 14:41:53 werkzeug.exceptions.NotFound: 404 Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.
2023-12-05 14:41:53 2023-12-05 14:41:53,213:WARNING:superset.views.base:HTTPException
2023-12-05 14:41:53 Traceback (most recent call last):
2023-12-05 14:41:53 File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1823, in full_dispatch_request
2023-12-05 14:41:53 rv = self.dispatch_request()
2023-12-05 14:41:53 File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1799, in dispatch_request
2023-12-05 14:41:53 return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
2023-12-05 14:41:53 File "/usr/local/lib/python3.9/site-packages/flask/scaffold.py", line 331, in send_static_file
2023-12-05 14:41:53 return send_from_directory(
2023-12-05 14:41:53 File "/usr/local/lib/python3.9/site-packages/flask/helpers.py", line 590, in send_from_directory
2023-12-05 14:41:53 return werkzeug.utils.send_from_directory( # type: ignore[return-value]
2023-12-05 14:41:53 File "/usr/local/lib/python3.9/site-packages/werkzeug/utils.py", line 578, in send_from_directory
2023-12-05 14:41:53 raise NotFound()
2023-12-05 14:41:53 werkzeug.exceptions.NotFound: 404 Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.
2023-12-05 14:41:53 192.168.65.1 - - [05/Dec/2023:14:41:53 +0000] "GET /static/appbuilder/select2/select2.css HTTP/1.1" 404 0 "http://localhost:8082/explore/?form_data_key=DQHTkqDFXtffWzPKYWWOvObk4We9PsomKjRATiDGy3sphErNjopkXo5Q-B40XmeH&viz_type=event_flow&datasource=20__table&datasource_id=20&datasource_type=table" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36"
2023-12-05 14:41:53 HTTPException
2023-12-05 14:41:53 Traceback (most recent call last):
2023-12-05 14:41:53 File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1823, in full_dispatch_request
2023-12-05 14:41:53 rv = self.dispatch_request()
2023-12-05 14:41:53 File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1799, in dispatch_request
2023-12-05 14:41:53 return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
2023-12-05 14:41:53 File "/usr/local/lib/python3.9/site-packages/flask/scaffold.py", line 331, in send_static_file
2023-12-05 14:41:53 return send_from_directory(
2023-12-05 14:41:53 File "/usr/local/lib/python3.9/site-packages/flask/helpers.py", line 590, in send_from_directory
2023-12-05 14:41:53 return werkzeug.utils.send_from_directory( # type: ignore[return-value]
2023-12-05 14:41:53 File "/usr/local/lib/python3.9/site-packages/werkzeug/utils.py", line 578, in send_from_directory
2023-12-05 14:41:53 raise NotFound()
2023-12-05 14:41:53 werkzeug.exceptions.NotFound: 404 Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.
2023-12-05 14:41:53 2023-12-05 14:41:53,219:WARNING:superset.views.base:HTTPException
2023-12-05 14:41:53 Traceback (most recent call last):
2023-12-05 14:41:53 File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1823, in full_dispatch_request
2023-12-05 14:41:53 rv = self.dispatch_request()
2023-12-05 14:41:53 File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1799, in dispatch_request
2023-12-05 14:41:53 return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
2023-12-05 14:41:53 File "/usr/local/lib/python3.9/site-packages/flask/scaffold.py", line 331, in send_static_file
2023-12-05 14:41:53 return send_from_directory(
2023-12-05 14:41:53 File "/usr/local/lib/python3.9/site-packages/flask/helpers.py", line 590, in send_from_directory
2023-12-05 14:41:53 return werkzeug.utils.send_from_directory( # type: ignore[return-value]
2023-12-05 14:41:53 File "/usr/local/lib/python3.9/site-packages/werkzeug/utils.py", line 578, in send_from_directory
2023-12-05 14:41:53 raise NotFound()
2023-12-05 14:41:53 werkzeug.exceptions.NotFound: 404 Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.
2023-12-05 14:41:53 192.168.65.1 - - [05/Dec/2023:14:41:53 +0000] "GET /static/appbuilder/datepicker/bootstrap-datepicker.css HTTP/1.1" 404 0 "http://localhost:8082/explore/?form_data_key=DQHTkqDFXtffWzPKYWWOvObk4We9PsomKjRATiDGy3sphErNjopkXo5Q-B40XmeH&viz_type=event_flow&datasource=20__table&datasource_id=20&datasource_type=table" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36"
2023-12-05 14:41:53 192.168.65.1 - - [05/Dec/2023:14:41:53 +0000] "GET /static/appbuilder/select2/select2-bootstrap-theme.css HTTP/1.1" 404 0 "http://localhost:8082/explore/?form_data_key=DQHTkqDFXtffWzPKYWWOvObk4We9PsomKjRATiDGy3sphErNjopkXo5Q-B40XmeH&viz_type=event_flow&datasource=20__table&datasource_id=20&datasource_type=table" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36"
2023-12-05 14:41:54 192.168.65.1 - - [05/Dec/2023:14:41:54 +0000] "GET /api/v1/database/?q=(filters:!((col:database_name,opr:neq,value:examples))) HTTP/1.1" 200 521 "http://localhost:8082/explore/?form_data_key=DQHTkqDFXtffWzPKYWWOvObk4We9PsomKjRATiDGy3sphErNjopkXo5Q-B40XmeH&viz_type=event_flow&datasource=20__table&datasource_id=20&datasource_type=table" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36"
2023-12-05 14:41:54 192.168.65.1 - - [05/Dec/2023:14:41:54 +0000] "GET /api/v1/database/?q=(filters:!((col:allow_file_upload,opr:upload_is_enabled,value:!t))) HTTP/1.1" 200 521 "http://localhost:8082/explore/?form_data_key=DQHTkqDFXtffWzPKYWWOvObk4We9PsomKjRATiDGy3sphErNjopkXo5Q-B40XmeH&viz_type=event_flow&datasource=20__table&datasource_id=20&datasource_type=table" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36"
2023-12-05 14:41:54 192.168.65.1 - - [05/Dec/2023:14:41:54 +0000] "GET /api/v1/explore/?form_data_key=DQHTkqDFXtffWzPKYWWOvObk4We9PsomKjRATiDGy3sphErNjopkXo5Q-B40XmeH&viz_type=event_flow&datasource_id=20&datasource_type=table HTTP/1.1" 200 2389 "http://localhost:8082/explore/?form_data_key=DQHTkqDFXtffWzPKYWWOvObk4We9PsomKjRATiDGy3sphErNjopkXo5Q-B40XmeH&viz_type=event_flow&datasource=20__table&datasource_id=20&datasource_type=table" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36"
2023-12-05 14:41:54 192.168.65.1 - - [05/Dec/2023:14:41:54 +0000] "GET /api/v1/database/1/table_extra/channels/main/ HTTP/1.1" 200 3 "http://localhost:8082/explore/?form_data_key=DQHTkqDFXtffWzPKYWWOvObk4We9PsomKjRATiDGy3sphErNjopkXo5Q-B40XmeH&viz_type=event_flow&datasource=20__table&datasource_id=20&datasource_type=table" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36"
2023-12-05 14:41:54 Superset.explore_json This API endpoint is deprecated and will be removed in version 4.0.0
2023-12-05 14:41:54 2023-12-05 14:41:54,705:WARNING:superset.views.base:Superset.explore_json This API endpoint is deprecated and will be removed in version 4.0.0
2023-12-05 14:41:54 2023-12-05 14:41:54,721:DEBUG:parsedatetime:eval - with context - False, False
2023-12-05 14:41:54 Cache key: db81d61dbf5d30dce5e2f4f1609d33fd
2023-12-05 14:41:54 2023-12-05 14:41:54,743:INFO:superset.viz:Cache key: db81d61dbf5d30dce5e2f4f1609d33fd
2023-12-05 14:41:54 192.168.65.1 - - [05/Dec/2023:14:41:54 +0000] "POST /superset/explore_json/ HTTP/1.1" 400 1175 "http://localhost:8082/explore/?form_data_key=DQHTkqDFXtffWzPKYWWOvObk4We9PsomKjRATiDGy3sphErNjopkXo5Q-B40XmeH&viz_type=event_flow&datasource=20__table&datasource_id=20&datasource_type=table" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36"
2023-12-05 14:41:54 192.168.65.1 - - [05/Dec/2023:14:41:54 +0000] "GET /api/v1/chart/0 HTTP/1.1" 404 24 "http://localhost:8082/explore/?form_data_key=DQHTkqDFXtffWzPKYWWOvObk4We9PsomKjRATiDGy3sphErNjopkXo5Q-B40XmeH&viz_type=event_flow&datasource=20__table&datasource_id=20&datasource_type=table" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36"
2023-12-05 14:41:55 192.168.65.1 - - [05/Dec/2023:14:41:55 +0000] "POST /api/v1/explore/form_data?tab_id=1 HTTP/1.1" 201 75 "http://localhost:8082/explore/?form_data_key=DQHTkqDFXtffWzPKYWWOvObk4We9PsomKjRATiDGy3sphErNjopkXo5Q-B40XmeH&viz_type=event_flow&datasource=20__table&datasource_id=20&datasource_type=table" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36"
2023-12-05 14:41:55 192.168.65.1 - - [05/Dec/2023:14:41:55 +0000] "POST /superset/log/?explode=events HTTP/1.1" 200 1 "http://localhost:8082/explore/?form_data_key=DQHTkqDFXtffWzPKYWWOvObk4We9PsomKjRATiDGy3sphErNjopkXo5Q-B40XmeH&viz_type=event_flow&datasource=20__table&datasource_id=20&datasource_type=table" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36"
- I have reproduced the issue with at least the latest released version of superset.
- I have checked the issue tracker for the same issue and I haven’t found one similar.
Additional context
Add any other context about the problem here.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 17 (8 by maintainers)
Commits related to this issue
- legacyRegularTime is being rendered in issue #26181 — committed to sivasathyaseeelan/superset by sivasathyaseeelan 3 years ago
- fix(chart): legacyRegularTime and charts are being rendered, and solves issue #26181 — committed to VinamilkCorp/superset by dvcong-vnm 3 years ago
- fix(chart): legacyRegularTime and charts are being rendered, and solves issue #26181 — committed to VinamilkCorp/superset by dvcong-vnm 3 years ago
Done a bit of probing into this one.
It appears that this chart uses the
legacyRegularTimesection, which gets disabled when the feature flagGENERIC_CHART_AXESis enabled.Which suggests that the missing time section is intentional, and actually the problem here is that the generic axes options aren’t being passed through to
get_sqla_querywhere the error message we see is actually generated. I’ll update the report to reflect this.thanks, @michael-s-molina! That’s really good context 🙏 Seems like solving this specific bug doesn’t make sense then, and instead a better option would be to recreate/upgrade this plugin to meet current needs/standards (leaving this comment here just as a potential suggestion for next steps if someone wants to tackle it)
TBH, I’m going to propose deprecating the event flow chart as part of Superset 5.0. If anyone wants to make a modern replacement, that’s great, but it seems like it’s not used by many, and it’s built with dependencies that are no longer maintained.
Hello @rusackas, I’m sorry to bother you again. Could you kindly suggest us on assigning @gauravruhela07 as assignee to this issue?