insert etl improved to handle auto-incremented primary key