Having an issue with bookmark comparison on a sql ...
# troubleshooting
g
Having an issue with bookmark comparison on a sql tap/target.
Copy code
singer_sdk.exceptions.InvalidStreamSortException: Unsorted data detected in stream. Latest value '2025-04-16T11:54:35.060000+00:00' is smaller than previous max '2025-04-16T11:54:35.063000+00:00
It looks like an issue on the constraint or the stream sorter that doesn't honor microseconds in the mssql datetime datatype.
e
Hi @Gordon Klundt 👋 Thanks for letting me know. This is indeed a bug in the SDK: https://github.com/meltano/sdk/issues/2998. Which variant of tap-mssql are you using? Knowing that I can send the maintainer a PR once the patch in the SDK goes out.
Hmm, I'm actually not able to reproduce this. I wonder if it's a quirk of how records are extracted from mssql.