Joining Sheets

Much like in SQL, VisiData lets you join multiple sheets together.

Note

If this concept is unfamiliar, you can read more about joins here and also here.

The sheet-joining three-step

To join two or more sheets in VisiData, you’ll do the following:

  1. In the sheets you want to join, mark the shared columns as “keys”
  2. In the Sheets Sheet, select the sheets you want to join
  3. Press & and then, at the prompt, indicate the type of join

VisiData supports five types of joins:

Join command SQL equivalent Description
inner LEFT INNER JOIN Keeps only rows which match keys on all sheets
outer LEFT OUTER JOIN Keeps all rows from first selected sheet
full FULL OUTER JOIN Keeps all rows from all sheets (union)
diff   Keeps only rows NOT in all sheets
append UNION ALL Keeps all rows from all sheets (concatenation)

(Descriptions above come from VisiData’s Quick Reference.)

Practical example

To see an example of joining in action, see the Distinctive Birds chapter.