Add prim_key to the header
Read prim_key from the header or get it from look-up keys