MongoDB FreeMarker Spark all together