From b4e8ae2bb522b770a211daf4a2acb9b2c5476153 Mon Sep 17 00:00:00 2001 From: Noel Gomez Date: Sun, 15 Oct 2023 11:09:40 -0700 Subject: [PATCH] add example sql for loans streamlit app and new exposure --- observe/streamlit/loans-example/example.sql | 19 +++++++++++++++++++ .../models/L4_exposures/loan_analytics.yml | 17 +++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 observe/streamlit/loans-example/example.sql create mode 100644 transform/models/L4_exposures/loan_analytics.yml diff --git a/observe/streamlit/loans-example/example.sql b/observe/streamlit/loans-example/example.sql new file mode 100644 index 00000000..e09a8f3e --- /dev/null +++ b/observe/streamlit/loans-example/example.sql @@ -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; diff --git a/transform/models/L4_exposures/loan_analytics.yml b/transform/models/L4_exposures/loan_analytics.yml new file mode 100644 index 00000000..ba1060f5 --- /dev/null +++ b/transform/models/L4_exposures/loan_analytics.yml @@ -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