Skip to content

Instantly share code, notes, and snippets.

@robert8138
Last active April 10, 2018 14:14
Show Gist options
  • Save robert8138/01f9e6e006dee98b0061ff4048e5f21d to your computer and use it in GitHub Desktop.
Save robert8138/01f9e6e006dee98b0061ff4048e5f21d to your computer and use it in GitHub Desktop.
Zipline example
source: {
type: hive
query:"""
SELECT
id_listing as listing
, dim_city as city
, dim_country as country
, dim_is_active as is_active
, CONCAT(ds, ' 23:59:59.999') as ts
FROM
core_data.dim_listings
WHERE
ds BETWEEN '{{ start_date }}' AND '{{ end_date }}'
"""
dependencies: [core_data.dim_listings]
is_snapshot: true
start_date: 2010-01-01
}
features: {
city: "City in which the listing is located."
country: "Country in which the listing is located."
is_active: "If the listing is active as of the date partition."
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment