Skip to content

Commit

Permalink
add example sql for loans streamlit app and new exposure
Browse files Browse the repository at this point in the history
  • Loading branch information
Noel Gomez committed Oct 15, 2023
1 parent e5a7738 commit b4e8ae2
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
19 changes: 19 additions & 0 deletions observe/streamlit/loans-example/example.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
-- These are useful queries to run for demo purposes

use role loader;
use warehouse wh_loading;

-- source table needs to have change tracking enabled
alter table RAW.LOANS.PERSONAL_LOANS set CHANGE_TRACKING = true;

-- see the rows in a table
select count(*)
from RAW.LOANS.PERSONAL_LOANS;

-- delete records from a table
delete
from RAW.LOANS.PERSONAL_LOANS
where left(addr_state, 1)> 'A';

-- dropping dymanic table
drop dynamic table balboa_dev.gomezn.PERSONAL_LOANS;
17 changes: 17 additions & 0 deletions transform/models/L4_exposures/loan_analytics.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
version: 2

exposures:

- name: loans_analysis
type: dashboard
maturity: medium
url: https://ddyxorozsz-gay725.east-us-a.datacoves.com/
description: >
Top 10 states with loans
depends_on:
- source('LOANS', 'PERSONAL_LOANS')

owner:
name: Noel Gomez
email: gomezn@datacoves.com

0 comments on commit b4e8ae2

Please sign in to comment.