티스토리 뷰

공부

[Spark] dayofweek 1 ~ 7(monday ~ sunday)

seunggabi 승가비 2020. 7. 24. 19:13
spark.sql("select dayofweek(time) as dow from some_table")

https://stackoverflow.com/questions/25006607/how-to-get-day-of-week-in-sparksql

 

How to get day of week in SparkSQL?

I am trying to select all record recorded at Sunday through SparkSQL. I have the following try but in vain. SELECT * FROM mytable WHERE DATEPART(WEEKDAY, create_time) = 0 SELECT * FROM mytable WHERE

stackoverflow.com

 

댓글
댓글쓰기 폼