Closed Cricle closed 3 months ago
What error do the timestamp values have?
What error do the timestamp values have?
The timestamp in some rows will error for inserted.
Like inserted '2020-01-01 00:00:00', when query result will be '2030-02-03 12:01:02'. I don't know it is duckdb error or the library error. I try use insert into to insert ~50w rows data, some result is error, I try insert ~15w rows, It will be ok.
Do you get a wrong result for the same row and column every time you run the code or is it different on each run? If it is the same every time you could put a breakpoint to see what the DuckDB.Net code does for that field to see if there is an error in converting DateTime
to DuckDBTimestampStruct
in DuckDBDateOnly.FromDateTime
or DuckDBTimeOnly.FromDateTime
Every time same row is wrong. I debug for check native api result, the DuckDBTimestamp is right, But I don't know if the others are correct.
Does it happen if you try to import only that one row?
No, I try appender or insert is ok.
If you can create a project that reproduces the issue I can try to have a look at it. It will be easier if you export MySQL data to a CSV file and use that in the demo so that I don't have to set up a database.
Ok, I will try to write a mini project and export all data.
Thanks.
My time zone is UTC+8.
Can you modify source code to read from CSV instead of MySQL?
AppendFail.zip Already modify to read csv
@Cricle Can you check if you still experience this issue with the 0.10.1 version?
Closing due to inactivity. If you still experience the issue feel free to reopen it.
At that time I want sync mysql to duckdb, I use appender to insert ~ 50w rows.
I after checked the data consistence, some
TIMESTAMP
value is error.Like that
But I try insert or update this row, It will be ok.
The append code is
The probability of this occurring is approximately once every thousands of lines.