setting primary key and foreign key of partitions
using worker based multiprocessing