Skip to content

Instantly share code, notes, and snippets.

@1ambda
Created December 26, 2021 23:49
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/ef044e0f57e347273608643bde117dc6 to your computer and use it in GitHub Desktop.
Save 1ambda/ef044e0f57e347273608643bde117dc6 to your computer and use it in GitHub Desktop.
spark.sql("""
CREATE TABLE IF NOT EXISTS airbnb_db.listing_meta (
listing_id BIGINT,
listing_name STRING,
listing_url STRING,
property_type STRING,
country STRING,
state STRING,
city STRING,
description STRING,
dt STRING
)
USING PARQUET
PARTITIONED BY (dt)
LOCATION 's3://airbnb-data-lake/db/listing_meta'
COMMENT 'Airbnb Listing Meta'
""")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment