-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
early on i was calling the db github_archive and then later octocatalog and it made much confuse
- Loading branch information
1 parent
9f60d30
commit 48b3c90
Showing
6 changed files
with
409 additions
and
6 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
with | ||
|
||
push_events as ( | ||
|
||
select * from {{ ref('stg_events') }} | ||
|
||
where event_type in ('PushEvent') | ||
|
||
), | ||
|
||
unnest_json as ( | ||
|
||
select | ||
event_id, | ||
actor_id, | ||
payload, | ||
repo_id, | ||
repo_name, | ||
actor_login, | ||
event_created_at, | ||
payload ->> '$.push_id' as push_id, | ||
payload ->> '$.size' as push_size, | ||
payload ->> '$.distinct_size' as push_distinct_size, | ||
payload -> '$.commits' as push_commits, | ||
|
||
from push_events | ||
|
||
) | ||
|
||
select * from unnest_json |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
sources: | ||
- name: github | ||
database: github_archive | ||
- name: octocatalog | ||
schema: raw | ||
tables: | ||
- name: github_events |
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
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
Oops, something went wrong.