Support filtering when copying records from one table to the other