You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Allow --filename={}/file.csv in addition to {}.csv
This is a minor tweak to handle some problems which I've encountered
several times now. The only real excuse for this change is that it's
unobstrusive and has natural semantics.
This patch modifies --filename to support two use cases:
xsv partition --filename {}/cities.csv state . all-cities.csv
xsv partition --filename {}/monuments.csv state . all-monuments.csv
xsv partition --filename {}/parks.csv state . all-parks.csv
Above, we want to partition our records by state into separate
directories, but we have multiple kinds of data.
xsv partition --filename {}/$(uuidgen).csv . input1.csv
xsv partition --filename {}/$(uuidgen).csv . input2.csv
Above, we're running multiple (possibly parallel) copies of xsv and we
want to parition the data into multiple directories without a filename
clash.
There's one limitation to the implementation: We might theoretically hit
the `create_dir_all` race condition recently fixed by
rust-lang/rust#39799. I'm planning to supply a final patch which works
around this race condition in stable Rust.
0 commit comments