See the module profile CSV for one way of doing this.