Created
December 26, 2021 05:52
-
-
Save 1ambda/ab68edce96c4c1f9f0f66c36b14783fa 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
propertyTypeHouse = 'House' | |
dfListingHouseAvailable = spark.sql(f""" | |
WITH | |
LISTING_HOUSE AS ( | |
SELECT id as listing_id, listing_url, name | |
FROM LISTING_META | |
WHERE property_type = '{propertyTypeHouse}' | |
) | |
SELECT | |
LISTING_CALENDAR.listing_id, | |
listing_url, | |
name as listing_name, | |
date, | |
available, | |
price | |
FROM LISTING_CALENDAR | |
INNER JOIN LISTING_HOUSE | |
ON LISTING_CALENDAR.listing_id = LISTING_HOUSE.listing_id | |
WHERE LISTING_CALENDAR.available = 't' | |
""") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment