jorourke opened a new issue #12576:
URL: https://github.com/apache/superset/issues/12576
Running superset in kubernetes using helm, using the image:
`apache/incubator-superset:latest`.
Steps:
Add a new query with SQLLab query:
```
SELECT AVG(value) as monthly_avg,
m.description as description,
trim(trailing ' Day' from m.description) as base_description,
m.name,
date_trunc('month', md.start_time) as m_month
from metric_daily md
join metric m on m.id = md.metric_id
where date_trunc('month', md.start_time) < date_trunc('month', now())
group by (date_trunc('month', md.start_time), m.id)
order by m_month desc;
```
and
```
metrics=> \d metric_daily
Table "public.metric_daily"
Column | Type | Collation | Nullable | Default
------------+--------------------------+-----------+----------+---------
created_at | timestamp with time zone | | not null | now()
start_time | timestamp with time zone | | not null |
metric_id | integer | | not null |
value | numeric | | not null |
updated_at | timestamp with time zone | | |
```
Add a Time-series table type using this query as the data set.
See the error: "Datetime column not provided as part table configuration and
is required by this type of chart"
Note: These charts will still render in a dashboard. They worked with a
previous release.
### Expected results
Should succeed with creating the chart.
### Actual results
See the error: "Datetime column not provided as part table configuration and
is required by this type of chart"
#### Screenshots


#### How to reproduce the bug
1. Create a Virtual Dataset using a query against Postgresql as a database
type
2. Add a new Time-series type chart with that dataset
3. Fill out the related pieces as above
4. Verify that the appropriate time column is shown to be temporal in the
edit dataset
5. Notice the error state "Datetime column not provided as part table
configuration and is required by this type of chart"
### Environment
(please complete the following information):
- superset version: `apache/incubator-superset:latest` (image)
- python version: rely on above docker image
- node.js version: Rely on docker image
### 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.
- [ 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
Add any other context about the problem here.
Here is the logs from the running service:
```
[superset-prod-758546b4f8-vg72t superset] 203.213.30.105
[18/Jan/2021:07:41:33 +0000] "POST
/superset/explore_json/?form_data=%7B%22slice_id%22%3A45%7D HTTP/1.1" 400
"https://eng-dashboards.qwilr.io/superset/explore/?form_data=%7B%22datasource%22%3A%2224__table%22%2C%22viz_type%22%3A%22time_table%22%2C%22slice_id%22%3A45%2C%22url_params%22%3A%7B%7D%2C%22time_range_endpoints%22%3A%5B%22inclusive%22%2C%22exclusive%22%5D%2C%22metrics%22%3A%5B%7B%22aggregate%22%3A%22MAX%22%2C%22column%22%3A%7B%22column_name%22%3A%22monthly_avg%22%2C%22description%22%3Anull%2C%22expression%22%3Anull%2C%22filterable%22%3Atrue%2C%22groupby%22%3Atrue%2C%22id%22%3A152%2C%22is_dttm%22%3Afalse%2C%22optionName%22%3A%22_col_monthly_avg%22%2C%22python_date_format%22%3Anull%2C%22type%22%3Anull%2C%22verbose_name%22%3Anull%7D%2C%22expressionType%22%3A%22SIMPLE%22%2C%22hasCustomLabel%22%3Afalse%2C%22isNew%22%3Afalse%2C%22label%22%3A%22COUNT%28monthly_avg%29%22%2C%22optionName%22%3A%22metric_ul6y2dxni4m_0py5ztqcobjg
%22%2C%22sqlExpression%22%3Anull%7D%5D%2C%22adhoc_filters%22%3A%5B%7B%22clause%22%3A%22WHERE%22%2C%22comparator%22%3Anull%2C%22expressionType%22%3A%22SQL%22%2C%22filterOptionName%22%3A%22filter_dymasoescc_a9ujts4cqq9%22%2C%22isExtra%22%3Afalse%2C%22isNew%22%3Afalse%2C%22operator%22%3Anull%2C%22sqlExpression%22%3A%22base_description++not+like+%27%25Uptime%25%27%22%2C%22subject%22%3Anull%7D%5D%2C%22groupby%22%3A%5B%22base_description%22%5D%2C%22column_collection%22%3A%5B%7B%22bounds%22%3A%5Bnull%2Cnull%5D%2C%22colType%22%3A%22time%22%2C%22comparisonType%22%3A%22value%22%2C%22d3format%22%3A%22%2C.0f%22%2C%22dateFormat%22%3A%22%22%2C%22height%22%3A%22%22%2C%22key%22%3A%22VhyuqIAMJ%22%2C%22label%22%3A%22This+Month+-+1%22%2C%22showYAxis%22%3Afalse%2C%22timeLag%22%3A1%2C%22timeRatio%22%3A%22%22%2C%22tooltip%22%3A%22load+time+in+milliseconds%22%2C%22width%22%3A%22%22%2C%22yAxisBounds%22%3A%5Bnull%2Cnull%5D%7D%2C%7B%22bounds%22%3A%5Bnull%2Cnull%5D%2C%22colType%22%3A%22time%22%2C%22comparison
Type%22%3A%22value%22%2C%22d3format%22%3A%22%2C.0f%22%2C%22dateFormat%22%3A%22%22%2C%22height%22%3A%22%22%2C%22key%22%3A%22qWGbRM2RJ%22%2C%22label%22%3A%22This+Month%22%2C%22showYAxis%22%3Afalse%2C%22timeLag%22%3A0%2C%22timeRatio%22%3A%22%22%2C%22tooltip%22%3A%22%22%2C%22width%22%3A%22%22%2C%22yAxisBounds%22%3A%5Bnull%2Cnull%5D%7D%2C%7B%22bounds%22%3A%5B0.05%2C-0.05%5D%2C%22colType%22%3A%22time%22%2C%22comparisonType%22%3A%22perc_change%22%2C%22d3format%22%3A%22.2%25%22%2C%22dateFormat%22%3A%22%22%2C%22height%22%3A%22%22%2C%22key%22%3A%226FUJNOm_o%22%2C%22label%22%3A%22Percentage+Change+%22%2C%22showYAxis%22%3Afalse%2C%22timeLag%22%3A1%2C%22timeRatio%22%3A%22%22%2C%22tooltip%22%3A%22Percentage+Change+between+this+month+and+previous%22%2C%22width%22%3A%22%22%2C%22yAxisBounds%22%3A%5Bnull%2Cnull%5D%7D%2C%7B%22bounds%22%3A%5Bnull%2Cnull%5D%2C%22colType%22%3A%22spark%22%2C%22comparisonType%22%3A%22%22%2C%22d3format%22%3A%22%22%2C%22dateFormat%22%3A%22%22%2C%22height%22%3A%22%22%2C%22key
%22%3A%22u6oSJi9aL%22%2C%22label%22%3A%22Trend%22%2C%22showYAxis%22%3Afalse%2C%22timeLag%22%3A0%2C%22timeRatio%22%3A%22%22%2C%22tooltip%22%3A%22%22%2C%22width%22%3A%22%22%2C%22yAxisBounds%22%3A%5Bnull%2Cnull%5D%7D%5D%7D"
"Mozilla/5.0 (Macintosh; Intel Mac OS X 11_1_0) AppleWebKit/537.36 (KHTML,
like Gecko) Chrome/87.0.4280.141 Safari/537.36"
```
----------------------------------------------------------------
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]