finalise deposting code and create CSV file partition