I am using Superset as a data visualizer with an SQLite database. Because SQLite doesn't have DATETIME type, I use the type TEXT to add a date and an hour.
Nevertheless, Superset then doesn't recognize that this "TEXT" or String is a date !
This is my data :
CREATE TABLE TEST(
TEST_ID int PRIMARY KEY NOT NULL,
VEHICLE_ID int NULL,
TEST_TYPE_ID int NULL,
CHECK_TYPE_ID int NULL,
NUM_TEST int NULL,
TEST_DATE TEXT NOT NULL
);
INSERT INTO TEST (TEST_ID, VEHICLE_ID, TEST_TYPE_ID, CHECK_TYPE_ID, NUM_TEST, TEST_DATE) VALUES (844, 504, 3, 1, 3, '2007-01-01 10:00:00');
Then in Superset I have the following message :
"Datetime column not provided as part table configuration and is required by this type of chart"
With the details :
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/superset/viz.py", line 234, in get_payload
df = self.get_df()
File "/usr/lib/python2.7/site-packages/superset/viz.py", line 78, in get_df
self.results = self.datasource.query(query_obj)
File "/usr/lib/python2.7/site-packages/superset/connectors/sqla/models.py", line 538, in query
qry = self.get_sqla_query(**query_obj)
File "/usr/lib/python2.7/site-packages/superset/connectors/sqla/models.py", line 370, in get_sqla_query
"Datetime column not provided as part table configuration "
Exception: Datetime column not provided as part table configuration and is required by this type of chart
I tried to replace TEXT by TEXT AS DATETIME creating the table but it's a syntax error.
Do you have any solution ?
There is a setting in the Datasource editor. On the Columns tab, change the Is Temporal flag to checked (true)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With