Complex sentence: Until his appointment to the Senate in 2012, he had been a citizenship judge from 2007 to 2012.
Split into simpler sentences: Until his appointment to the Senate in 2012. He had been a citizenship judge from 2007 to 2012.