A data broker sells market segmentations created by consumer data to a producer with private production cost who sells a product to a unit mass of consumers with heterogeneous values. In this setting, I completely characterize the revenue-maximizing mechanisms for the data broker. In particular, every optimal mechanism induces quasi-perfect price discrimination. That is, the data broker sells the producer a market segmentation described by a cost-dependent cutoff, such that all the consumers with values above the cutoff end up buying and paying their values while the rest of consumers do not buy. The characterization of optimal mechanisms leads to additional economically relevant implications. I show that the induced market outcomes remain un...