public static Command createUpdateProcedure(Update update, QueryMetadataInterface metadata, CommandContext context) throws QueryResolverException, QueryMetadataException, TeiidComponentException, TeiidProcessingException {
QueryRewriter rewriter = new QueryRewriter(metadata, context, null);
Criteria crit = update.getCriteria();
ArrayList<SingleElementSymbol> selectSymbols = rewriter.mapChangeList(update, null);
Query query = new Query(new Select(selectSymbols), new From(Arrays.asList(new UnaryFromClause(update.getGroup()))), crit, null, null);
return rewriter.createUpdateProcedure(update, query, update.getGroup(), update.getGroup().getName());
}