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/01/18 07:44:04 UTC

[GitHub] [superset] jorourke opened a new issue #12576: Error when creating Time-series table with virtual dataset: "Datetime column not provided as part table configuration and is required by this type of chart"

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
   ![Screenshot showing the page erroring with related setting](https://user-images.githubusercontent.com/410950/104885199-c394d700-59bb-11eb-8452-7140d8a4e814.png)
   
   
   
   ![Screenshot of the edit dataset showing that the column is Temporal](https://user-images.githubusercontent.com/410950/104885330-035bbe80-59bc-11eb-89b4-dadaf8b119bd.png)
   
   
   #### 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:
users@infra.apache.org



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


[GitHub] [superset] jorourke removed a comment on issue #12576: Error when creating Time-series table with virtual dataset: "Datetime column not provided as part table configuration and is required by this type of chart"

Posted by GitBox <gi...@apache.org>.
jorourke removed a comment on issue #12576:
URL: https://github.com/apache/superset/issues/12576#issuecomment-762097874


   @villebro  & @zhaoyongjie  Thanks for you help on this. I'd like to become a contributor to this project. Could you suggest a way I might get started in that direction? I have a good match of skillsets programming in python/flask/sqlalchemy and some React work too. 


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


[GitHub] [superset] junlincc closed issue #12576: Error when creating Time-series table with virtual dataset: "Datetime column not provided as part table configuration and is required by this type of chart"

Posted by GitBox <gi...@apache.org>.
junlincc closed issue #12576:
URL: https://github.com/apache/superset/issues/12576


   


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


[GitHub] [superset] jorourke commented on issue #12576: Error when creating Time-series table with virtual dataset: "Datetime column not provided as part table configuration and is required by this type of chart"

Posted by GitBox <gi...@apache.org>.
jorourke commented on issue #12576:
URL: https://github.com/apache/superset/issues/12576#issuecomment-762097874


   @villebro  & @zhaoyongjie  Thanks for you help on this. I'd like to become a contributor to this project. Could you suggest a way I might get started in that direction? I have a good match of skillsets programming in python/flask/sqlalchemy and some React work too. 


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


[GitHub] [superset] jorourke commented on issue #12576: Error when creating Time-series table with virtual dataset: "Datetime column not provided as part table configuration and is required by this type of chart"

Posted by GitBox <gi...@apache.org>.
jorourke commented on issue #12576:
URL: https://github.com/apache/superset/issues/12576#issuecomment-762061208


   > @jorourke this should be fixed on master as of last Friday and the upcoming 1.0 release that's currently being voted on. You should also use `apache/superset`, not the old `apache/incubator-superset`: https://hub.docker.com/r/apache/superset/tags?page=1&ordering=last_updated . I just checked and this bug should be fixed on `apache/superset:latest`.
   
   Ah, ok, let me try that. Thanks for your help.


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


[GitHub] [superset] villebro commented on issue #12576: Error when creating Time-series table with virtual dataset: "Datetime column not provided as part table configuration and is required by this type of chart"

Posted by GitBox <gi...@apache.org>.
villebro commented on issue #12576:
URL: https://github.com/apache/superset/issues/12576#issuecomment-762055511


   @jorourke this should be fixed on master as of last Friday and the upcoming 1.0 release that's currently being voted on. You should also use `apache/superset`, not the old `apache/incubator-superset`: https://hub.docker.com/r/apache/superset/tags?page=1&ordering=last_updated . I just checked and this bug should be fixed on `apache/superset:latest`.


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


[GitHub] [superset] zhaoyongjie commented on issue #12576: Error when creating Time-series table with virtual dataset: "Datetime column not provided as part table configuration and is required by this type of chart"

Posted by GitBox <gi...@apache.org>.
zhaoyongjie commented on issue #12576:
URL: https://github.com/apache/superset/issues/12576#issuecomment-762054345


   @jorourke the latest master has fixed this issue.  Thanks for your report bug.


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