I have Spark Data Frame 1 of several columns: (user_uuid, url, date_visit)
I want to transform this DF1 to Data Frame 2 with form : (user_uuid, domain, date_visit)
What I wanted to use is regular expression to detect domain and apply it to DF1 val regexpr = """(?i)^((https?):\/\/)?((www|www1)\.)?([\w-\.]+)""".r
Could you please help me composing code to transform Data Frames in Scala? I am completely new to Spark and Scala and syntax is hard. Thanks!
selectfor this", it would have been clear you had put some work in, not just thrown this over the wall to SO. I'm not (intentionally) lecturing, but I'm trying to do my tiny bit to encourage people to do the work necessary to avoid wasting the time of the man y others who might read a question.Got two comment upvotes too, so looks like I'm not completely isolated on this