Created
December 26, 2021 23:30
-
-
Save 1ambda/956920db6ab4c5c015dc83ce9d164fb2 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
dfListingAvailabilityFinal\ | |
.repartition(2)\ | |
.write\ | |
.format("parquet")\ | |
.mode("overwrite")\ | |
.save("s3://airbnb-data-lake/db/listing_availability") | |
# Spark Session 시작 후 스키마가 변경될 경우 REFRESH TABLE 을 이용해 테이블 정보를 다시 받아올 수 있습니다 | |
# spark.catalog.refreshTable("airbnb_db.listing_availability") 와 동일 | |
spark.sql("REFRESH TABLE airbnb_db.listing_availability") | |
spark.sql(""" | |
SELECT * | |
FROM airbnb_db.listing_availability | |
""").show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment