Find updated rows between two files (csv) #1097
-
I have two csv files where I would like to find out if a row were inserted, updated or deleted. My files look like:
With the following command I can find all rows which are present in $ mlr --csv join --np --ul -j id -f a.csv b.csv
id,color
2,green With the following command I can find all rows which are present in $ mlr --csv join --np --ul -j id -f b.csv a.csv
id,color
7,gray But how can I find out which rows where updated in $ ???
id,color
6,black And is it possible to generate a new csv with an additional column? Something like: $ ???
id,color,type
2,green,delete
7,gray,insert
6,black,update |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
@benedictdudel very interesting question!!! :D One thought:
Or (longer)
|
Beta Was this translation helpful? Give feedback.
@benedictdudel very interesting question!!! :D
One thought:
Or (longer)