@lazydba123, I moved your question to this new thread because the one you originally posted this question in was pretty much resolved back in the Summer of 2017. It also wasn't clear from your question whether you're using python or not, and the original post was concerned with the pyspark syntax.
Bill Brooks, Community Moderator
Was your question answered? Make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.