Using Spark DSL to build queries