You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Importing a public data set or using a dataset on an external DB using "ts" TIMESTAMP WITH TIME ZONE, works fine but using wizard to manage a simple timerange produce an empty result.
How to reproduce the bug
Follow the first steps of the guide: https://preset.io/blog/timeseries-cratedb-superset/
CREATE TABLE IF NOT EXISTS "doc"."power_consumption" (
"ts" TIMESTAMP WITH TIME ZONE,
"Global_active_power" REAL,
"Global_reactive_power" REAL,
"Voltage" REAL,
"Global_intensity" REAL,
"Sub_metering_1" REAL,
"Sub_metering_2" REAL,
"Sub_metering_3" REAL,
"meter_id" TEXT,
"location" GEO_POINT,
"city" TEXT
)
CLUSTERED INTO 4 SHARDS
Populated with sample data.
Now set a filter on ts like that:
Looks like the generated query has a .0 at the ond of timestamps which is not understood by internal superset engine and by external DB.
This is the query generated by SuperSet:
SELECT DATE_TRUNC('day', ts) AS ts,
sum("Global_active_power") AS "SUM(Global_active_power)"
FROM doc.power_consumption
WHERE ts >= 1172707200000.0
AND ts < 1206748800000.0
GROUP BY DATE_TRUNC('day', ts)
ORDER BY "SUM(Global_active_power)" DESC
LIMIT 10000
I've tested on external CrateDB and on imported data.
The result is the same.
Screenshots/recordings
No response
Superset version
3.1.1
Python version
3.9
Node version
16
Browser
Firefox
Additional context
No response
Checklist
I have searched Superset docs and Slack and didn't find a solution to my problem.
I have searched the GitHub issue tracker and didn't find a similar bug report.
I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.
The text was updated successfully, but these errors were encountered:
Bug description
Importing a public data set or using a dataset on an external DB using "ts" TIMESTAMP WITH TIME ZONE, works fine but using wizard to manage a simple timerange produce an empty result.
How to reproduce the bug
Follow the first steps of the guide:
https://preset.io/blog/timeseries-cratedb-superset/
CREATE TABLE IF NOT EXISTS "doc"."power_consumption" (
"ts" TIMESTAMP WITH TIME ZONE,
"Global_active_power" REAL,
"Global_reactive_power" REAL,
"Voltage" REAL,
"Global_intensity" REAL,
"Sub_metering_1" REAL,
"Sub_metering_2" REAL,
"Sub_metering_3" REAL,
"meter_id" TEXT,
"location" GEO_POINT,
"city" TEXT
)
CLUSTERED INTO 4 SHARDS
Populated with sample data.
Now set a filter on ts like that:
![immagine](https://private-user-images.githubusercontent.com/5641820/309786261-82fa1d66-b3f2-4f4b-919f-5c799212a04f.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk0MTI4MDIsIm5iZiI6MTczOTQxMjUwMiwicGF0aCI6Ii81NjQxODIwLzMwOTc4NjI2MS04MmZhMWQ2Ni1iM2YyLTRmNGItOTE5Zi01Yzc5OTIxMmEwNGYucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxMyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTNUMDIwODIyWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NzMyNjg0NDU2NTFlMWQxZTJmNjhhZmY0ODI2NjE4MDgyYmIyMTYyZDQwMThiYmYwNDg1ZDM5YzhhOWY3ZGM0YiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.JrTsFBrWySJZaz8l0bUCcS0TzmOzqk1qpgD_re1eseI)
Looks like the generated query has a .0 at the ond of timestamps which is not understood by internal superset engine and by external DB.
This is the query generated by SuperSet:
SELECT DATE_TRUNC('day', ts) AS ts,
sum("Global_active_power") AS "SUM(Global_active_power)"
FROM doc.power_consumption
WHERE ts >= 1172707200000.0
AND ts < 1206748800000.0
GROUP BY DATE_TRUNC('day', ts)
ORDER BY "SUM(Global_active_power)" DESC
LIMIT 10000
I've tested on external CrateDB and on imported data.
The result is the same.
Screenshots/recordings
No response
Superset version
3.1.1
Python version
3.9
Node version
16
Browser
Firefox
Additional context
No response
Checklist
The text was updated successfully, but these errors were encountered: