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
I assumed based on the help that I could use xsv join --cross - some-data.csv - (echo new_field\n0 | psub) (in fish, hence the psub for process substitution…same issue if I write to a file) to add an entry of 0 for new_field to all the rows in some-data.csv, since a cross join is doing a cartesian product rather than matching up specific columns.
xsv however complains if the number of columns specified don't match or if the columns specified are not the same name, even though that's not required for a cartesian product.
The text was updated successfully, but these errors were encountered:
Ah…I see I can just supply 1 as the columns for both inputs so that it 'joins' on the first column (i.e., xsv join --cross 1 some-data.csv 1 (echo new_field\n0 | psub) works). Is that actually being used by the logic or is it just required for the CLI args to be validated?
If it's the latter, I might open a PR to mention that usage note in the CLI doc string.
I assumed based on the help that I could use
xsv join --cross - some-data.csv - (echo new_field\n0 | psub)
(in fish, hence thepsub
for process substitution…same issue if I write to a file) to add an entry of0
fornew_field
to all the rows insome-data.csv
, since a cross join is doing a cartesian product rather than matching up specific columns.xsv
however complains if the number of columns specified don't match or if the columns specified are not the same name, even though that's not required for a cartesian product.The text was updated successfully, but these errors were encountered: