Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
function date_trunc(unknown, text) does not exist in Line Chart #8910
When trying to create a line chart from a datasource I have uploaded (through CSV upload), I get the following error:
The column details and date format are exactly the same as the 'examples.birthnames' provided by Superset. Why do I get an error? Database is Superset's own Postgres
In my understanding Postgres tries to apply the date_trunc() function on a column with data type 'text', which will obviously fail.
If you check the column dtype of this table, e.g., using any DB explorer like pgadmin or DBeaver you will most likely see that it is of type text and not timestamp.
By adding the column to the Parse Dates list, you tell Superset (in fact, supposedly, Pandas' read_csv() function) to try to interpret the column as timestamp, which then leads to setting the correct dtype in the DB table.