Although traditionally thought to have been composed during Bach's period in Weimar or Cöthen, Bach scholars have revised that dating based on an analysis of the extant manuscripts and on stylistic considerations.
According to Wolff (1994), the trio sonata was composed between 1736 and 1741 in Leipzig, where, since 1729, Bach had been director of the Collegium Musicum, a chamber music society performing weekly at the Café Zimmermann.
The version for viola da gamba and harpsichord, BWV 1027, as well as the other two sonatas for this ensemble, are dated by Laurence Dreyfus, Christoph Wolff and others to the same period.
[4][5][6][7] Pieter Dirksen has surmised that although the Gamba sonata BWV 1027 corresponds to one of Bach's own autograph manuscript from 1740, the other sources, one of them with Bach's son Johann Gottfried Bernhard as scribe, probably date from 1735 or later.
Stinson also thinks it possible that the organ arrangement could originate from a lost trio sonata in G major for two violins and basso continuo.