Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New stocks #21

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions models/staging/stocks/stg_stocks__fund_ownership.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
with

source as (

select * from {{ source('stocks', 'fund_ownership') }}

),

renamed as (

select
symbol,
report_date,
organization,
pct_held as percent_held,
position as position_total,
value as position_value,
pct_change as percent_change

from source

)

select * from renamed
23 changes: 23 additions & 0 deletions models/staging/stocks/stg_stocks__grade_history.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
with

source as (

select * from {{ source('stocks', 'grade_history') }}

),

renamed as (

select
symbol,
epoch_grade_date,
firm,
to_grade,
from_grade,
action as grade_action

from source

)

select * from renamed
27 changes: 27 additions & 0 deletions models/staging/stocks/stg_stocks__insider_transactions.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
with

source as (

select * from {{ source('stocks', 'insider_transactions') }}

),

renamed as (

select
symbol,
shares,
filer_url,
transaction_text,
filer_name,
filer_relation,
money_text,
start_date,
ownership,
value as total_value

from source

)

select * from renamed
24 changes: 24 additions & 0 deletions models/staging/stocks/stg_stocks__recommendation_trends.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
with

source as (

select * from {{ source('stocks', 'recommendation_trends') }}

),

renamed as (

select
symbol,
period,
strong_buy as strong_buy_total,
buy as buy_total,
hold as hold_total,
sell as sell_total,
strong_sell as strong_sell_total

from source

)

select * from renamed
23 changes: 23 additions & 0 deletions models/staging/stocks/stg_stocks__sec_filings.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
with

source as (

select * from {{ source('stocks', 'sec_filings') }}

),

renamed as (

select
symbol,
date as report_date,
epoch_date,
type as report_type,
title as report_title,
edgar_url

from source

)

select * from renamed
1 change: 0 additions & 1 deletion models/staging/tpch/stg_tpch_line_items.sql
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ renamed as (
l_commitdate as commit_date,
l_receiptdate as receipt_date,
l_shipinstruct as ship_instructions,
l_shipmode as ship_mode,
l_comment as comment

from source
Expand Down
Loading