Combining MongoDB, Spark and Freemarker