  (Abridged) Complex organic molecules (COMs) are commonly detected in and near
star-forming regions. However, the dominant process in the release of these
COMs from the icy grains - where they predominately form - to the gas phase is
still an open question. We investigate the origin of COM emission in a
protostellar source, CygX-N30, through high-angular-resolution interferometric
observations over a continuous broad frequency range. We used 32 GHz
Submillimeter Array observations with continuous frequency coverage from 329 to
361 GHz at an angular resolution of ~1" to do a line survey and obtain a
chemical inventory of the source. The line emission was used to determine
column densities and excitation temperatures for the COMs. We mapped out the
intensity distribution of the different species and identified approximately
400 lines that can be attributed to 29 different molecular species and their
isotopologues. We find that the molecular peak emission is along a linear
gradient, coinciding with the axis of red- and blueshifted H2CO and CS
emission. Chemical differentiation is detected along this gradient, with the
O-bearing molecular species peaking towards one component of the system and the
N- and S-bearing species peaking towards the other. The inferred column
densities and excitation temperatures are compared to other sources where COMs
are abundant. The origin of the observed COM emission is probably a combination
of the young stellar sources along with accretion of infalling material onto a
disc-like structure surrounding a young protostar. The low D/H ratio observed
(<0.1%) likely reflects a pre-stellar phase where COMs formed on the ices at
warm temperatures (~ 30 K), with inefficient deuterium fractionation. The
observations and results presented here demonstrate the importance of good
frequency coverage and high angular resolution when disentangling the origin of
COM emission.
