Daily Learning · 2022-12-03 · Blockchain
Midas, Dune, SQL, DBT
Midas - October portfolio is dipping largely into the GLP “index” on GMX. The index is used to leverage long and short positions. Where the price appreciates when traders lose money and depreciates when traders make money. GLP is made up of BTC, ETH, LINK, UNI, DAI, USDC, FRAX, USDT, and MIM. 45% Stables, 30% ETH, 25% BTC
Dune - Adding a parameter. Simply create a query and below the terminal select “add parameter”.
- Learned about setting up dbt and creating spellbooks in a presentation
- Spellbook-docs.dune.com
- Jinja gets inserted at the from step by using {{Source(…)}}
SQL - When gathering summation data make sure you have the “denominator” if you are getting the average. Example from today was making sure order_id was included in the GROUP BY of the first cte. This was combined with employee_id and the CASE call
dbt (data building tool) - open source framework that injects classical software development into SQL by mixing SQL with JINJA (python templating language).
- Main point seems to be that dbt makes an analytics department more collaborative. Instead of siloed queries and data sets, teams can work with the same data, subqueries, cte’s, and more.