Parse upstream Query