EAV extract format

Needs to use Lines from mundane and is there somewhere we can add this such that it is a lot simpler inline here (I assume there is a duplicate of this in pivot somewhere)?