}
final Table table = tables[0];
final DataContextProvider dataContextProvider = _analysisJobBuilder.getDataContextProvider();
final DataContext dc = dataContextProvider.getDataContext();
final Query q = dc.query().from(table).select(physicalColumns.toArray(new Column[physicalColumns.size()])).toQuery();
q.setMaxRows(DEFAULT_PREVIEW_ROWS);
for (TransformerJobBuilder<?> tjb : transformerJobs) {
initialize(tjb);
}
// getting the output columns can be an expensive call, so we do it
// upfront in stead of for each row.
final Map<TransformerJobBuilder<?>, List<MutableInputColumn<?>>> outputColumns = new LinkedHashMap<TransformerJobBuilder<?>, List<MutableInputColumn<?>>>();
for (TransformerJobBuilder<?> tjb : transformerJobs) {
List<MutableInputColumn<?>> cols = tjb.getOutputColumns();
outputColumns.put(tjb, cols);
}
final List<InputRow> result = new ArrayList<InputRow>();
final DataSet dataSet = dc.executeQuery(q);
int rowNumber = 0;
while (dataSet.next()) {
Row row = dataSet.getRow();
InputRow inputRow = new MetaModelInputRow(rowNumber, row);