Skip to content

Instantly share code, notes, and snippets.

@1ambda
Created December 26, 2021 23:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 1ambda/d440b9bd4c9d4382cb273c9da960359d to your computer and use it in GitHub Desktop.
Save 1ambda/d440b9bd4c9d4382cb273c9da960359d to your computer and use it in GitHub Desktop.
spark.sql("""
CREATE TABLE IF NOT EXISTS airbnb_db.listing_calendar (
listing_id BIGINT,
date DATE,
available STRING,
price DOUBLE,
adjusted_price DOUBLE,
minimum_nights BIGINT,
maximum_nights BIGINT,
dt STRING
)
USING PARQUET
PARTITIONED BY (dt)
LOCATION 's3://airbnb-data-lake/db/airbnb_listing_calendar'
COMMENT 'Airbnb Listing Calendar'
""")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment