How the BIDS template engine processes data