We introduce a numerical homogenization method based on a discontinuous Galerkin finite element heterogeneous multiscale method (DG-HMM) to efficiently approximate the effective solution of parabolic advection-diffusion problems with rapidly varying coefficients, large Péclet number and compressible flows. To estimate the missing data of an effective model, numerical upscaling is performed which accurately captures the effects of microscopic solenoidal or gradient flow at a macroscopic scale such as enhancement or depletion of the effective diffusion. For compressible flow with periodic data, we derive sharp a priori error estimates for the macro and micro discretization errors which are robust in the advection dominated regime. Numerical tests confirm the error estimates for problems with periodic data and illustrate the applicability of our method for problems with non-periodic data.