Once your CSV files are properly sorted on a primary key, they can also be efficiently compared to produce a diff file, using my other lib https://github.com ...
There are two values in gam.cfg that can be used to filter the input from gam csv commands. csv_input_row_filter - A list or JSON dictionary used to include specific rows based on column values ...