#csvdiff — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #csvdiff, aggregated by home.social.
-
RE: https://floss.social/@janriemer/114760556247092176
New version of #CSVDiff is out! :awesome:
https://crates.io/crates/csv-diff
Thanks to it now using `extract_if` instead of a hacky drain-then-filter impl, you can now e.g. diff your x-mas wishlist against your "actual-gifts-received list" _25% faster_ (and be happy, if no diff is reported)! 🎅 🚀
⚠️ The new version has an MSRV of 1.88 (in order to use `extract_if`)!
See the complete changelog for details:
https://gitlab.com/janriemer/csv-diff/-/blob/main/CHANGELOG.md#012-23-december-2025Happy X-Mas y'all! 🎄 🎁
-
#Fuzzing along in #CSVDiff :awesome:
In the second screenshot I've highlighted some interesting parts:
Key field indices are 2 and 3, so when diffing the records, where key fields are highlighted, they'll be compared as `Modify`, because:
- key fields are equal between left and right record
- other fields are unequal between left and right recordThe other two records on the right have no corresponding left record - so those are `Add`ed records
-
#Fuzzing along in #CSVDiff :awesome:
In the second screenshot I've highlighted some interesting parts:
Key field indices are 2 and 3, so when diffing the records, where key fields are highlighted, they'll be compared as `Modify`, because:
- key fields are equal between left and right record
- other fields are unequal between left and right recordThe other two records on the right have no corresponding left record - so those are `Add`ed records
-
#Fuzzing along in #CSVDiff :awesome:
In the second screenshot I've highlighted some interesting parts:
Key field indices are 2 and 3, so when diffing the records, where key fields are highlighted, they'll be compared as `Modify`, because:
- key fields are equal between left and right record
- other fields are unequal between left and right recordThe other two records on the right have no corresponding left record - so those are `Add`ed records
-
#Fuzzing along in #CSVDiff :awesome:
In the second screenshot I've highlighted some interesting parts:
Key field indices are 2 and 3, so when diffing the records, where key fields are highlighted, they'll be compared as `Modify`, because:
- key fields are equal between left and right record
- other fields are unequal between left and right recordThe other two records on the right have no corresponding left record - so those are `Add`ed records
-
#Fuzzing along in #CSVDiff :awesome:
In the second screenshot I've highlighted some interesting parts:
Key field indices are 2 and 3, so when diffing the records, where key fields are highlighted, they'll be compared as `Modify`, because:
- key fields are equal between left and right record
- other fields are unequal between left and right recordThe other two records on the right have no corresponding left record - so those are `Add`ed records
-
Just published a new version of csv-diff (v0.1.1) 🚀
https://lib.rs/crates/csv-diff
This fixes a nasty bug regarding sort order of modified csv records. 😖
Details in the MR/PR:
https://gitlab.com/janriemer/csv-diff/-/merge_requests/31Also, two new incoming PRs for #qsv, the #CSV toolkit:
The first updates to the latest csv-diff, fixing aforementioned bug:
https://github.com/dathere/qsv/pull/2456The second fixes a bug regarding conversion from column names to indices:
https://github.com/dathere/qsv/pull/2457 -
Ouch, there is another bug and this time it is actually _in #CSVDiff itself_!
It happens with sorting the results of modified rows (urgh, I'm also not happy with the sorting code).😨
Thankfully, datatraveller1 already has found a reproducible example - thank you so much! ❤️
Bug:
https://github.com/dathere/qsv/issues/2443#issuecomment-2598987465I think I already found a solution, but needs rigorous testing first!
Potential solution:
https://github.com/dathere/qsv/issues/2443#issuecomment-2599681431 -
Nice, I think I found the bug! 🐛
See all the explanation and possible solution here:
=> https://github.com/dathere/qsv/issues/2443#issuecomment-2597097311
Workaround is also present and explained, so should be no blocker for people.
Will prob provide a fix on the weekend. 🤞
-
Uh ohhhh, someone reported a bug in qsv's `diff` command.😮 🙈
https://github.com/dathere/qsv/issues/2443
Hopefully, we can resolve this soon! 🤞🥺
I have a strong suspicion, but let's see... I need more info first from the OP.
-
#CsvDiff has finally reached v0.1.0, it's first ever non-alpha/-beta release! 🎉
New features like getting at the headers from the diffresult have been needed for the following PR in qsv (which is in final review):
https://github.com/jqnatividad/qsv/pull/1395When merged, you'll be able to decide, whether the diffresult should output headers or not (see examples in the PR). :awesome:
Check out csv-diff's Changelog for the full details:
https://gitlab.com/janriemer/csv-diff/-/blob/main/CHANGELOG.md?ref_type=heads#010-30-october-2023 -
I can't reproduce the bug. ¯\_(ツ)_/¯
Neither in #CsvDiff ...
https://gitlab.com/janriemer/csv-diff/-/commit/0ac6ba724656dbcc620eefda3f8ec5d8064134d6...nor in #qsv
https://github.com/jqnatividad/qsv/pull/1297My assumption is that they have forgotten to specify the option --right-delimiter (or --left-delimiter, respectively), when executing `qsv diff`:
https://github.com/jqnatividad/qsv/issues/1258#issuecomment-1712842883Anyway, we now have additional tests in csv-diff and qsv, so definitely a win, regardless of the outcome! 🎉
@floriann FYI
-
Yay! Sorting the #csv diff result by columns has just been merged into #qsv! 🥳
-
A new version of csv-diff is out (v0.1.0-beta.2) 🎉
https://lib.rs/crates/csv-diff
This version adds a method, which allows you to sort your diff result by columns (it was already possible to sort by lines).
See the changelog for an example:
https://gitlab.com/janriemer/csv-diff/-/blob/8642a8a7ba14e22d076cee8c3f690c17f41d7528/CHANGELOG.md#010-beta2-19-february-2023Sorting by columns will soon be integrated into qsv, the #CSV toolkit:
https://github.com/jqnatividad/qsv/issues/714Thank you @jqnatividad for the idea of this feature! 💚