Sorry I'm a bit confused about your example.
So assuming you have two tables:
Table1 (represented by mycsv.csv in the sample below) like this:
Table 2 (represented by mycsv2.csv in the sample below) like this:
The following code:
| inputcsv mycsv.csv | join max=0 ID [ | inputcsv mycsv2.csv ]
Will provide the following output:
ID field1 field2 1 A X 1 A Z 2 B Y 1 E X 1 E Z
As per the attached picture.
Is that what you are looking for?