To address the uncertain output of distributed generators (DGs) for reactive power optimization in active distribution networks, the stochastic programming model is widely used. The model is employed to find an optimal control strategy with minimum expected network loss while satisfying all the physical constraints. Therein, the probability distribution of uncertainties in the stochastic model is always pre-defined by the historical data. However, the empirical distribution can be biased due to a limited amount of historical data and thus result in a suboptimal control decision. Therefore, in this paper, a data-driven modeling approach is introduced to assume that the probability distribution from the historical data is uncertain within a confidence set. Furthermore, a data-driven stochastic programming model is formulated as a two-stage problem, where the first-stage variables find the optimal control for discrete reactive power compensation equipment under the worst probability distribution of the second stage recourse. The second-stage variables are adjusted to uncertain probability distribution. In particular, this two-stage problem has a special structure so that the second-stage problem can be directly decomposed into several small-scale sub-problems, which can be handled in parallel without the information of dual problems. Numerical study on two distribution systems has been performed. Comparisons with the two-stage stochastic and robust approaches demonstrate the effectiveness of the proposal.