Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@1ambda
Created December 26, 2021 23:54
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/9b78653b282902f4b51330cd80c9255f to your computer and use it in GitHub Desktop.
Save 1ambda/9b78653b282902f4b51330cd80c9255f to your computer and use it in GitHub Desktop.
partitionListingMeta = '20211101'
spark.sql(f"""
INSERT OVERWRITE airbnb_db.listing_meta
PARTITION (dt = '{partitionListingMeta}')
SELECT
CAST(id AS BIGINT) as listing_id,
name as listing_name,
listing_url,
property_type,
country,
state,
city,
description
FROM LISTING_META -- 이전 섹션에서 만든 Temporary View 입니다
""")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment