Created
June 19, 2022 10:46
-
-
Save danthelion/69a9e67950097a40f4ebf9cc7a45410e to your computer and use it in GitHub Desktop.
Staging model for Find My Items
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
{{ | |
config( | |
materialized='table' | |
) | |
}} | |
with raw as ( | |
select | |
name as name, | |
timestamp as ts, | |
location ->> 'latitude' as latitude, | |
location ->> 'longitude' as longitude, | |
location ->> 'altitude' as altitude, | |
role ->> 'emoji' as emoji | |
from {{ source('tap_findmy', 'item') }} | |
) | |
select | |
latitude::float, | |
longitude::float, | |
altitude::float, | |
ts, | |
emoji, | |
name | |
from raw |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment