Created
December 27, 2021 12:35
-
-
Save 1ambda/845feafbc2c934da59e3c5c81bb79e4c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dfCalendarMetaMonth = spark.sql(""" | |
SELECT sequence(to_date('2020-01-01'), to_date('2020-12-31'), interval 1 month) as date | |
""")\ | |
.withColumn("date", explode(col("date")))\ | |
.orderBy(asc(col("date"))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment