Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: ER_TRUNCATED_WRONG_VALUE: Truncated incorrect datetime value #309

Closed
SriSivaC opened this issue Dec 26, 2019 · 3 comments
Closed
Labels
bug Something isn't working

Comments

@SriSivaC
Copy link

Description
I have created a cube named 'JobStatus' on a table job_status with measures on successJobs, errorJobs,valid_docs,total_docs,error_docs. The cube also contains a Pre-Aggregation on the same measures with a TimeDimension Reference on CreatedTS. This Pre-Aggregation has a granularity of DAY and partitionGranularity of month.

When trying to create a chart or table with successJobs as Measure and CreatedTS as time dimension, I have the following error:
Error: Error: Time series queries without dateRange aren't supported
To avoid this error, i have tried to change the time range to all available options such as All time, Today, Last year, etc. No matter what range I have selected I get the same error:
Error: Error: ER_TRUNCATED_WRONG_VALUE: Truncated incorrect datetime value: '2019-11-01T00:00:00Z'.

If cube.js supports MySQL Database, I don't understand why playground is not able to send datetime fields properly for pre-aggregations.

This particular field that I am using for time dimension is DateTime in my original DB.

Similar errors are coming for integer based pre-aggregations like count, sum, etc

To Reproduce
Steps to reproduce the behavior:

  1. Usae a DB with any DateTime column as time dimensions.
  2. Click on measure and select your measure, click on the time dimension range and select any range.

Expected behavior
The pre-aggregations tables should have been created without format issues.

Version:
[0.13.0]

@paveltiunov
Copy link
Member

Hey @SriSivaC ! Thanks for posting this one! Could you please share your cube.js schema? Are you using external pre-aggregations?

@paveltiunov paveltiunov added the question The issue is a question. Please use Stack Overflow for questions. label Dec 29, 2019
@SriSivaC
Copy link
Author

Please check your slack channel , I have DM'd you the json @paveltiunov .
This is the link to the htread https://cube-js.slack.com/archives/CC0403RRR/p1577100741020500

@paveltiunov
Copy link
Member

@SriSivaC Thanks for sending this! I can confirm there's an issue with partitionGranularity in mysql.

@paveltiunov paveltiunov added bug Something isn't working and removed question The issue is a question. Please use Stack Overflow for questions. labels Dec 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants