Skip to content

Instantly share code, notes, and snippets.

@mshakhomirov
Created November 27, 2022 11:22
Show Gist options
  • Save mshakhomirov/38ce5e98d7057a030b89401d5038f997 to your computer and use it in GitHub Desktop.
Save mshakhomirov/38ce5e98d7057a030b89401d5038f997 to your computer and use it in GitHub Desktop.
config {
type: "test",
dataset: "reputation_data_v"
}
-- use input to mock some test data for production.reputation_data table used by the view:
input "reputation_data" {
select
'{"user_id":1,"reputation_level":3.5,"updated_at":"1999-01-01 00:00:01 UTC"}' as src
}
-- run the view and we expect to get:
select
1 as user_id
,3.5 as reputation_level
,timestamp('1999-01-01 00:00:01 UTC') as updated_at
;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment