Skip to content

Commit

Permalink
add coingecko table to common
Browse files Browse the repository at this point in the history
  • Loading branch information
0xnirmal committed Jun 24, 2024
1 parent 3b16144 commit cdb2976
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 1 deletion.
1 change: 1 addition & 0 deletions databases.csv
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ CARDANO
CCTP
CELESTIA
CELO
COMMON
COMPOUND
COSMOSHUB
EIGENPIE
Expand Down
2 changes: 1 addition & 1 deletion dbt_scripts/grant_permissions.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def grant_usage_to_db(db_name, role_name):


if __name__ == "__main__":
asset_list = pd.read_csv("assets.csv")
asset_list = pd.read_csv("databases.csv")
script = "use role accountadmin;\n"
print("Generating script to grant permissions")

Expand Down
6 changes: 6 additions & 0 deletions models/common/__common__sources.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
sources:
- name: PC_DBT_DB_UPSTREAM
schema: prod
database: pc_dbt_db
tables:
- name: fact_coingecko_token_date_adjusted_gold
15 changes: 15 additions & 0 deletions models/common/daily_market_data.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{{
config(
snowflake_warehouse="COMMON",
database="common",
schema="core",
)
}}

select
date,
coingecko_id,
shifted_token_price_usd as price,
shifted_token_market_cap as market_cap,
shifted_token_h24_volume_usd as h24_volume
from {{ source("PC_DBT_DB_UPSTREAM", "fact_coingecko_token_date_adjusted_gold") }} as fact_coingecko_token_date_adjusted_gold

0 comments on commit cdb2976

Please sign in to comment.