Marc Marquez secured his seventh consecutive pole position at the Sachsenring ahead of Hector Barbera and Valentino Rossi.