datapusher-plus icon indicating copy to clipboard operation
datapusher-plus copied to clipboard

start proposal to fix error with mean for Date fields

Open avdata99 opened this issue 2 months ago • 0 comments

Error:

        Error: {
            "message": "Could not copy stats data to database: invalid input syntax for type double precision: 
                       \"2025-03-01\"\n
                       CONTEXT: COPY 34f58005-11c1-4263-a43f-876a2a365e6d-druf-stats, line 7, 
                       column mean: \"2025-03-01\"\n
                       "
        }

The CSV data for this error is a column with Date values like 2025-03-01 QSV define it as Date field (correct) but then the stats table define the mean as FLOAT

CREATE TABLE {} (
                field TEXT,
                type TEXT,
               ...
               mean FLOAT,
               ...
            )

The mean value is also a string like 2025-03-01

So we can't save this stats table.

CSV failing example

errored-date.csv

avdata99 avatar Oct 28 '25 19:10 avdata99