Frequently, parameters in optimization models are subject to a high level of uncertainty coming from several sources and, as such, assuming them to be deterministic can lead to solutions that are infeasible in practice. Robust optimization is a computationally efficient approach that generates solutions that are feasible for realizations of uncertain parameters near the nominal value. This paper develops a data-driven robust optimization approach for the scheduling of a straight pipeline connecting a single refinery with multiple distribution centers, considering uncertainty in the injection rate. For that, we apply support vector clustering to learn an uncertainty set for the robust version of the deterministic model. We compare the performance of our proposed robust model against one utilizing a standard robust optimization approach and conclude that data-driven robust solutions are less conservative.