The Sonata in E minor for flute or recorder and basso continuo by J. S. Bach, usually catalogued as BWV 1034, is a work in four movements. It is largely believed to have been written during Bach's Cöthen period (1717–23), when he was employed as Capellmeister for Prince Leopold of Cöthen. However, there is some evidence that this may have been written slightly later, after Bach's move to Leipzig. The piece was published more than a hundred years later, in 1867.