Added function to select projection in DB for a step in schema xmas