# Name your project! Project names should contain only lowercase characters and underscores. A good package name should reflect your organization's name or the intended use of these models
name: 'onedb_modern_analytics'
version: '1.0.0'
config-version: 2
# This setting configures which "profile" dbt uses for this project.
profile: 'snowflake-onedb'
# These configurations specify where dbt should look for different types of files.
# The `model-paths` config, for example, states that models in this project can be
# found in the "models/" directory. You probably won't need to change these!
model-paths: ["models"]
analysis-paths: ["analysis"]
test-paths: ["tests"]
seed-paths: ["data","seeds"]
macro-paths: ["macros"]
snapshot-paths: ["snapshots"]
target-path: "target" # directory which will store compiled SQL files
clean-targets: # directories to be removed by `dbt clean`
- "target"
- "dbt_modules"
vars:
last_run: "{{ batch_last_run_date() }}"
batch_name: master_batch
etl_proc_wid: "{{ etl_proc_wid() }}"
# Below on-run-end hook is for updating the status of the batch if any of the jobs fails.
on-run-start: "{{ project_setup() }}"
on-run-end: "{{ batch_results_update(results) }}"
# Configuring models
# In this config, we tell dbt to build all models in the onedb_modern_analytics directory
# as tables. These settings can be overridden in the individual model files
models:
onedb_modern_analytics:
# Applies to all files under models/
+persist_docs :
relation: true
columns: true
+copy_grants: true
# Applies to all files under models/datamarts/
datamarts:
materialized: table
transient: false
query_tag: dbt datamart query
analytics:
schema: EDM_AI
finance:
schema: EDM_AI
marketing:
schema: EDM_AI
sales:
schema: EDM_AI
external:
schema: EDM_EXTERNAL
external_org:
schema: EDM_EXTERNAL_ORG
# Applies to all files under models/staging/
staging:
# Prehook to logging the model execution in the Platform logging table.
+pre-hook: "{{job_logging_insert_update('In Progress')}}"
+post-hook: "{{job_logging_insert_update('Completed')}}"
schema: EDW_TRANSIENT
materialized: table
transient: false
query_tag: dbt staging query
position_dimension:
materialized: table
config:
schema: EDW_CONFIG
materialized: table
transient: false
query_tag: dbt config query
example:
schema: EDW_MODELED
materialized: table
transient: false
query_tag: dbt datawarehouse query
# Curated Layer
curated:
Flex:
schema: CURATED_FLEX
materialized: view
transient: false
query_tag: dbt curated layer
Hubspot:
schema: CURATED_HUBSPOT
materialized: view
transient: false
query_tag: dbt curated layer
Loanworks:
schema: CURATED_LOANWORKS
materialized: view
transient: false
query_tag: dbt curated layer
# Warehouse Layer
warehouse:
# Prehook to logging the model execution in the Platform logging table.
+pre-hook: "{{job_logging_insert_update('In Progress')}}"
+post-hook: "{{job_logging_insert_update('Completed')}}"
onedbHL:
schema: WH_onedbHL
materialized: table
transient: false
query_tag: dbt warehouse layer
analytics:
schema: WH_ANALYTICS
materialized: table
transient: false
query_tag: dbt warehouse layer
lookups:
schema: EDW_TRANSIENT
materialized: table
transient: true
nextgen:
schema: WH_NEXTGEN
materialized: table
transient: false
query_tag: dbt warehouse layer
securities:
schema: WH_SECURITIES
materialized: table
transient: false
query_tag: dbt warehouse layer
# Serving Layer
serving:
onedbHL:
schema: onedbHL
materialized: view
transient: false
query_tag: dbt serving layer
Analytics:
schema: ANALYTICS
materialized: view
transient: false
query_tag: dbt serving layer
Legacy_Staff:
schema: LEGACY_STAFF
materialized: view
transient: false
query_tag: dbt serving layer
Legacy_Members:
schema: LEGACY_MEMBERS
materialized: view
transient: false
query_tag: dbt serving layer
Nextgen:
schema: NEXTGEN
materialized: view
transient: false
query_tag: dbt serving layer
Securities:
schema: SECURITIES
materialized: view
transient: false
query_tag: dbt serving layer
# Below configurations are
snapshots:
onedb_modern_analytics:
staging:
+target_schema: RAW_CRM
datawarehouse:
seeds:
onedb_modern_analytics:
+schema: EDW_TRANSIENT
+quote_columns: false
# This configures NON_FLEX_PRODUCT_DATA.csv
NON_FLEX_PRODUCT_DATA:
+full_refresh: true
# Override column types
+column_types:
EFF_END_DT: VARCHAR(600)
EFF_START_DT: VARCHAR(600)
PROD_LN_WID: VARCHAR(768)
LAST_UPD: TIMESTAMP_NTZ(9)
ABN_REQ: VARCHAR(600)
ALOC_ASSETS_FLG: VARCHAR(600)
ACT: VARCHAR(600)
AOLM_NAME: VARCHAR(600)
AUTO_APP_CC: VARCHAR(600)
CREDIT_IMPAIRED_FLG: VARCHAR(600)
DESC_TEXT: VARCHAR(6144)
DETAIL_TYPE_CD: VARCHAR(600)
DFRD_EST_FEE: VARCHAR(600)
DISP_CMPNT_FLG: VARCHAR(600)
DISP_CMPNT_PRI_FLG: VARCHAR(600)
EQUITY_FLG: VARCHAR(600)
FEATURE_BPAY: VARCHAR(600)
FEATURE_BRIDGING: VARCHAR(600)
FEATURE_CONSTRUCTION: VARCHAR(600)
FEATURE_DEBIT_CARD: VARCHAR(600)
FEATURE_DIR_CREDIT: VARCHAR(600)
FEATURE_DIR_DEBIT: VARCHAR(600)
FEATURE_EARLY_REPAY: VARCHAR(600)
FEATURE_EFTPOS: VARCHAR(600)
FEATURE_INTEREST_CAP: VARCHAR(600)
FEATURE_LMI: VARCHAR(600)
FEATURE_LMI_CAPITALISE: VARCHAR(600)
FEATURE_LOC: VARCHAR(600)
FEATURE_NET_BANKING: VARCHAR(600)
FEATURE_PHONE_TRF: VARCHAR(600)
FEATURE_PORTABLE: VARCHAR(600)
FEATURE_POST: VARCHAR(600)
FEATURE_RATE_LOCK: VARCHAR(600)
FEATURE_REPAY_EXTRA: VARCHAR(600)
FEATURE_REPAY_FNT: VARCHAR(600)
FEATURE_REPAY_MTH: VARCHAR(600)
FEATURE_REPAY_WK: VARCHAR(600)
FEATURE_SALARY_DIR: VARCHAR(600)
FEATURE_SPLIT: VARCHAR(600)
FEATURE_TRN_ACC: VARCHAR(600)
FEE_DETAIL: VARCHAR(8000)
FULL_DOC_FLG: VARCHAR(600)
INT_IN_ADVANCE_FLG: VARCHAR(600)
INTEGRATION_ID: VARCHAR(600)
INV_FLG: VARCHAR(600)
NO_DOC_FLG: VARCHAR(600)
NSW: VARCHAR(600)
NT: VARCHAR(600)
OFFSET: VARCHAR(600)
ONGOING_CYCLE: VARCHAR(4500)
OO_FLG: VARCHAR(600)
PART_NUM: VARCHAR(600)
PAYG_LOW_DOC_REQ: VARCHAR(600)
PISCES_NAME: VARCHAR(600)
PROD_NAME: VARCHAR(600)
PRODUCT_CLASS: VARCHAR(600)
PROF: VARCHAR(600)
QLD: VARCHAR(600)
RATE_DETAILS: VARCHAR(600)
REDRAW: VARCHAR(600)
REPAY_OPTION: VARCHAR(600)
RESERVABLE_FLG: VARCHAR(600)
REVERSE_MORTGAGE_FLG: VARCHAR(600)
SA: VARCHAR(600)
SKIP_FLG: VARCHAR(600)
TAS: VARCHAR(600)
VENDOR_NAME: VARCHAR(600)
VENDR_PART_NUM: VARCHAR(600)
VIC: VARCHAR(600)
VISIBLE_FLG: VARCHAR(600)
WA: VARCHAR(600)
NON_FLEX_CRM_PERSON:
+full_refresh: true
# Override column types
+column_types:
ETL_PROC_WID: NUMBER(38,0)
ROW_WID: NUMBER(38,0)
INTEGRATION_ID: VARCHAR(800)
DATASOURCE_NUM_ID: NUMBER(10,0)
CREATED: TIMESTAMP_NTZ(9)
TITLE: VARCHAR(800)
FST_NAME: VARCHAR(800)
LAST_NAME: VARCHAR(800)
MID_NAME: VARCHAR(800)
BIRTH_DT: TIMESTAMP_NTZ(9)
EMAIL_ADDR: VARCHAR(800)
ALT_EMAIL_ADDR: VARCHAR(800)
FULL_NAME: VARCHAR(800)
JOB_TITLE: VARCHAR(800)
MARITAL_STAT_CD: VARCHAR(800)
PREF_COMM_MEDIA: VARCHAR(800)
SEX_MF: VARCHAR(800)
ST_ADDRESS: VARCHAR(800)
CITY: VARCHAR(800)
STATE: VARCHAR(800)
ZIPCODE: VARCHAR(800)
COUNTRY: VARCHAR(800)
WORK_PH_NUM: VARCHAR(800)
FAX_PH_NUM: VARCHAR(800)
SUPPRESS_EMAIL_FLG: VARCHAR(50)
SUPPRESS_FAX_FLG: VARCHAR(50)
SUPPRESS_CALL_FLG: VARCHAR(50)
SUPPRESS_MAIL_FLG: VARCHAR(50)
HOUSEHOLD_CONTACT_FLG: VARCHAR(50)
BEST_CALL_TIME: VARCHAR(800)
CELL_PH_NUM: VARCHAR(800)
ALIAS_NAME: VARCHAR(800)
SPOUSE_ID: VARCHAR(800)
SPOUSE_FST_NAME: VARCHAR(800)
SPOUSE_MID_NAME: VARCHAR(800)
SPOUSE_LAST_NAME: VARCHAR(800)
REL_TYPE_CD: VARCHAR(800)
CONSUMER_FLG: VARCHAR(4)
TAM_CONTACT_DT: TIMESTAMP_NTZ(9)
TAM_CONTACT_STATUS: VARCHAR(4)
OCCUPATION: VARCHAR(800)
SELF_EMPLOYED_FLG: VARCHAR(50)
PR_POSTN_ID: VARCHAR(800)
HOME_PH_NUM: VARCHAR(800)
EMP_FLG: VARCHAR(4)
HAVEN_TYPE: VARCHAR(800)
DO_NOT_CONTACT: VARCHAR(800)
UNSUB_GREEN: VARCHAR(1)
UNSUB_AMBER: VARCHAR(1)
UNSUB_HAVEN: VARCHAR(1)
UNSUB_BIRTHDAY: VARCHAR(1)
UNSUB_CHRISTMAS: VARCHAR(1)
UNSUB_RATE_ALERT: VARCHAR(1)
RATE_ALERT_ST_DT: DATE
PR_PER_ADDR_ID: VARCHAR(800)
STATUS_CD: VARCHAR(120)
MKTG_COMMERCIAL_FLG: VARCHAR(50)
EMAIL_STATUS: VARCHAR(800)
X_onedb_DO_NOT_CROSS_SELL_FLG_2: VARCHAR(50)
NUM_DEPENDENTS: VARCHAR(50)
BROKER_DO_NOT_CONTACT_FLG: VARCHAR(50)
UNSUB_SMART: VARCHAR(50)
GREEN_RCNT_MKT_DT: DATE
LOAN_TRACK_RCNT_MKT_DT: DATE
WELCOME_SENT_DT: DATE
SMART_RCNT_MKT_DT: DATE
CAR_LOAN_SENT_DT: DATE
MKTG_VALID_EMAIL: VARCHAR(1)
MKTG_VALID_NAME: VARCHAR(1)
MKTG_VALID_ADDR: VARCHAR(1)
DELETED: VARCHAR(50)
DO_NOT_OFFER_CAR_LOAN: VARCHAR(1)
FLEX_LOB:
+full_refresh: true
# Override column types
+column_types:
ROW_WID: NUMBER(10,0)
DATASOURCE_NUM_ID: NUMBER(10,0)
INTEGRATION_ID: VARCHAR(800)
LOB: VARCHAR(800)
NON_FLEX_WC_POSITION:
+full_refresh: true
# Override column types
+column_types:
DATASOURCE_NUM_ID: NUMBER(10,0)
ETL_PROC_WID: NUMBER(10,0)
INTEGRATION_ID: VARCHAR2(30 CHAR)
ROW_WID: NUMBER(10,0)
TYPE_FLG: CHAR(1 CHAR)
DIVN_NAME: VARCHAR2(100 CHAR)
EMP_FST_NAME: VARCHAR2(50 CHAR)
EMP_ID: VARCHAR2(15 CHAR)
EMP_LAST_NAME: VARCHAR2(50 CHAR)
EMP_LOGIN: VARCHAR2(50 CHAR)
EMP_MID_NAME: VARCHAR2(50 CHAR)
PAR_INTEGRATION_ID: VARCHAR2(30 CHAR)
POSITION_NAME: VARCHAR2(50 CHAR)
POSTN_TYPE_CD: VARCHAR2(30 CHAR)
VIS_BU_ID: VARCHAR2(15 CHAR)
VIS_POS_ID: VARCHAR2(15 CHAR)
VIS_PR_EMP_ID: VARCHAR2(15 CHAR)
DESC_TEXT: VARCHAR2(50 CHAR)
COST_CENTER: VARCHAR2(5 CHAR)
ORG_NAME: VARCHAR2(100 CHAR)
ORG_ADDR: VARCHAR2(200 CHAR)
OU_ID: VARCHAR2(15 CHAR)
ACQ_TYPE: VARCHAR2(20 CHAR)
ACQUIRED_DT: DATE
ORG_TYPE: VARCHAR2(30 CHAR)
CAMP_BILL_AUTH: VARCHAR2(30 CHAR)
CAMP_START_DT: DATE
CAMP_END_DT: DATE
CREATED_DT: DATE
HAVEN_START_DT: DATE
HAVEN_END_DT: DATE
LW_FLG: CHAR(1 CHAR)
OFFICE_BEARER_FLG: CHAR(1 CHAR)
GREEN_STATUS: VARCHAR2(30 CHAR)
GREEN_START_DT: DATE
GREEN_END_DT: DATE
AMBER_STATUS: VARCHAR2(30 CHAR)
AMBER_START_DT: DATE
AMBER_END_DT: DATE
RED_STATUS: VARCHAR2(30 CHAR)
RED_START_DT: DATE
RED_END_DT: DATE
HAVEN_STATUS: VARCHAR2(30 CHAR)
BIRTHDAY_STATUS: VARCHAR2(30 CHAR)
BIRTHDAY_START_DT: DATE
BIRTHDAY_END_DT: DATE
CHRISTMAS_STATUS: VARCHAR2(30 CHAR)
CHRISTMAS_START_DT: DATE
CHRISTMAS_END_DT: DATE
RATE_ALERT_STATUS: VARCHAR2(30 CHAR)
RATE_ALERT_START_DT: DATE
RATE_ALERT_END_DT: DATE
GREEN_TYPE: VARCHAR2(15 CHAR)
AMBER_TYPE: VARCHAR2(15 CHAR)
PROGRAM_TYPE: VARCHAR2(30 CHAR)
BRM_EMP_ID: VARCHAR2(15 CHAR)
BRM_POSTN_ID: VARCHAR2(15 CHAR)
BRM_FULL_NAME: VARCHAR2(100 CHAR)
BRM_POSTN: VARCHAR2(50 CHAR)
LIFE_INS_STATUS: VARCHAR2(30 CHAR)
LIFE_INS_START_DT: DATE
LIFE_INS_END_DT: DATE
LOAN_TRACK_STATUS: VARCHAR2(30 CHAR)
LOAN_TRACK_START_DT: DATE
LOAN_TRACK_END_DT: DATE
WELCOME_STATUS: VARCHAR2(30 CHAR)
WELCOME_START_DT: DATE
WELCOME_END_DT: DATE
PROCURE_STATUS: VARCHAR2(30 CHAR)
PROCURE_START_DT: DATE
PROCURE_END_DT: DATE
PROSPECT_STATUS: VARCHAR2(30 CHAR)
PROSPECT_START_DT: DATE
PROSPECT_END_DT: DATE
REVIEW_STATUS: VARCHAR2(30 CHAR)
REVIEW_START_DT: DATE
REVIEW_END_DT: DATE
ANNIVERSARY_STATUS: VARCHAR2(30 CHAR)
ANNIVERSARY_START_DT: DATE
ANNIVERSARY_END_DT: DATE
SETTLEMENT_STATUS: VARCHAR2(30 CHAR)
SETTLEMENT_START_DT: DATE
SETTLEMENT_END_DT: DATE
ALLIANZ_STATUS: VARCHAR2(30 CHAR)
ALLIANZ_START_DT: DATE
ALLIANZ_END_DT: DATE
DEPR_STATUS: VARCHAR2(30 CHAR)
DEPR_START_DT: DATE
DEPR_END_DT: DATE
CAR_LOAN_STATUS: VARCHAR2(30 CHAR)
CAR_LOAN_START_DT: DATE
CAR_LOAN_END_DT: DATE
VEDA_STATUS: VARCHAR2(30 CHAR)
VEDA_START_DT: DATE
EMAIL_ADDR: VARCHAR2(350 CHAR)
MKTG_BILL_OPTION: VARCHAR2(30 CHAR)
BUSINESS_STATUS: VARCHAR2(30 CHAR)
BUSINESS_START_DT: DATE
BUSINESS_END_DT: DATE
RM_POSTN_ID: VARCHAR2(15 CHAR)
RM_POSTN: VARCHAR2(50 CHAR)
RM_EMP_ID: VARCHAR2(15 CHAR)
RM_FULL_NAME: VARCHAR2(100 CHAR)
CBDM_POSTN_ID: VARCHAR2(15 CHAR)
CBDM_POSTN: VARCHAR2(50 CHAR)
CBDM_EMP_ID: VARCHAR2(15 CHAR)
CBDM_FULL_NAME: VARCHAR2(100 CHAR)
NATIONAL_BDM_FLG: CHAR(1 CHAR)
CLIENTGOLIVE:
+full_refresh: true
# Override column types
+column_types:
CLIENT_ID: VARCHAR(800)
CLIENT: VARCHAR(800)
GOLIVE: DATE
GOLIVE_DK: NUMBER(10,0)
WC_ORG_LKP_CATEGORY:
+full_refresh: true
# Override column types
+column_types:
SALES_TEAM: VARCHAR(800)
CATEGORY: VARCHAR(800)
THRESHOLD_MIN: NUMBER(22,7)
THRESHOLD_MAX: NUMBER(22,7)
CATEGORY_DEFINITION: VARCHAR(800)
LINE_OF_BUSINESS: VARCHAR(800)
THIRD_PARTY_PERMISSIONS:
+full_refresh: true
# Override column types
+column_types:
ACCOUNT_NAME: VARCHAR(100)
BROKER_ID: VARCHAR(100)
ORG_ID: VARCHAR(100)
THIRD_PARTY_READER_ACCOUNTS:
+full_refresh: true
# Override column types
+column_types:
ACCOUNT_NAME: VARCHAR(100)
ACCOUNT_ID: VARCHAR(100)# Name your project! Project names should contain only lowercase characters and underscores. A good package name should reflect your organization's name or the intended use of these models
name: 'onedb_modern_analytics'
version: '1.0.0'
config-version: 2
# This setting configures which "profile" dbt uses for this project.
profile: 'snowflake-onedb'
# These configurations specify where dbt should look for different types of files.
# The `model-paths` config, for example, states that models in this project can be
# found in the "models/" directory. You probably won't need to change these!
model-paths: ["models"]
analysis-paths: ["analysis"]
test-paths: ["tests"]
seed-paths: ["data","seeds"]
macro-paths: ["macros"]
snapshot-paths: ["snapshots"]
target-path: "target" # directory which will store compiled SQL files
clean-targets: # directories to be removed by `dbt clean`
- "target"
- "dbt_modules"
vars:
last_run: "{{ batch_last_run_date() }}"
batch_name: master_batch
etl_proc_wid: "{{ etl_proc_wid() }}"
# Below on-run-end hook is for updating the status of the batch if any of the jobs fails.
on-run-start: "{{ project_setup() }}"
on-run-end: "{{ batch_results_update(results) }}"
# Configuring models
# In this config, we tell dbt to build all models in the onedb_modern_analytics directory
# as tables. These settings can be overridden in the individual model files
models:
onedb_modern_analytics:
# Applies to all files under models/
+persist_docs :
relation: true
columns: true
+copy_grants: true
# Applies to all files under models/datamarts/
datamarts:
materialized: table
transient: false
query_tag: dbt datamart query
analytics:
schema: EDM_AI
finance:
schema: EDM_AI
marketing:
schema: EDM_AI
sales:
schema: EDM_AI
external:
schema: EDM_EXTERNAL
external_org:
schema: EDM_EXTERNAL_ORG
# Applies to all files under models/staging/
staging:
# Prehook to logging the model execution in the Platform logging table.
+pre-hook: "{{job_logging_insert_update('In Progress')}}"
+post-hook: "{{job_logging_insert_update('Completed')}}"
schema: EDW_TRANSIENT
materialized: table
transient: false
query_tag: dbt staging query
position_dimension:
materialized: table
config:
schema: EDW_CONFIG
materialized: table
transient: false
query_tag: dbt config query
example:
schema: EDW_MODELED
materialized: table
transient: false
query_tag: dbt datawarehouse query
# Curated Layer
curated:
Flex:
schema: CURATED_FLEX
materialized: view
transient: false
query_tag: dbt curated layer
Hubspot:
schema: CURATED_HUBSPOT
materialized: view
transient: false
query_tag: dbt curated layer
Loanworks:
schema: CURATED_LOANWORKS
materialized: view
transient: false
query_tag: dbt curated layer
# Warehouse Layer
warehouse:
# Prehook to logging the model execution in the Platform logging table.
+pre-hook: "{{job_logging_insert_update('In Progress')}}"
+post-hook: "{{job_logging_insert_update('Completed')}}"
onedbHL:
schema: WH_onedbHL
materialized: table
transient: false
query_tag: dbt warehouse layer
analytics:
schema: WH_ANALYTICS
materialized: table
transient: false
query_tag: dbt warehouse layer
lookups:
schema: EDW_TRANSIENT
materialized: table
transient: true
nextgen:
schema: WH_NEXTGEN
materialized: table
transient: false
query_tag: dbt warehouse layer
securities:
schema: WH_SECURITIES
materialized: table
transient: false
query_tag: dbt warehouse layer
# Serving Layer
serving:
onedbHL:
schema: onedbHL
materialized: view
transient: false
query_tag: dbt serving layer
Analytics:
schema: ANALYTICS
materialized: view
transient: false
query_tag: dbt serving layer
Legacy_Staff:
schema: LEGACY_STAFF
materialized: view
transient: false
query_tag: dbt serving layer
Legacy_Members:
schema: LEGACY_MEMBERS
materialized: view
transient: false
query_tag: dbt serving layer
Nextgen:
schema: NEXTGEN
materialized: view
transient: false
query_tag: dbt serving layer
Securities:
schema: SECURITIES
materialized: view
transient: false
query_tag: dbt serving layer
# Below configurations are
snapshots:
onedb_modern_analytics:
staging:
+target_schema: RAW_CRM
datawarehouse:
seeds:
onedb_modern_analytics:
+schema: EDW_TRANSIENT
+quote_columns: false
# This configures NON_FLEX_PRODUCT_DATA.csv
NON_FLEX_PRODUCT_DATA:
+full_refresh: true
# Override column types
+column_types:
EFF_END_DT: VARCHAR(600)
EFF_START_DT: VARCHAR(600)
PROD_LN_WID: VARCHAR(768)
LAST_UPD: TIMESTAMP_NTZ(9)
ABN_REQ: VARCHAR(600)
ALOC_ASSETS_FLG: VARCHAR(600)
ACT: VARCHAR(600)
AOLM_NAME: VARCHAR(600)
AUTO_APP_CC: VARCHAR(600)
CREDIT_IMPAIRED_FLG: VARCHAR(600)
DESC_TEXT: VARCHAR(6144)
DETAIL_TYPE_CD: VARCHAR(600)
DFRD_EST_FEE: VARCHAR(600)
DISP_CMPNT_FLG: VARCHAR(600)
DISP_CMPNT_PRI_FLG: VARCHAR(600)
EQUITY_FLG: VARCHAR(600)
FEATURE_BPAY: VARCHAR(600)
FEATURE_BRIDGING: VARCHAR(600)
FEATURE_CONSTRUCTION: VARCHAR(600)
FEATURE_DEBIT_CARD: VARCHAR(600)
FEATURE_DIR_CREDIT: VARCHAR(600)
FEATURE_DIR_DEBIT: VARCHAR(600)
FEATURE_EARLY_REPAY: VARCHAR(600)
FEATURE_EFTPOS: VARCHAR(600)
FEATURE_INTEREST_CAP: VARCHAR(600)
FEATURE_LMI: VARCHAR(600)
FEATURE_LMI_CAPITALISE: VARCHAR(600)
FEATURE_LOC: VARCHAR(600)
FEATURE_NET_BANKING: VARCHAR(600)
FEATURE_PHONE_TRF: VARCHAR(600)
FEATURE_PORTABLE: VARCHAR(600)
FEATURE_POST: VARCHAR(600)
FEATURE_RATE_LOCK: VARCHAR(600)
FEATURE_REPAY_EXTRA: VARCHAR(600)
FEATURE_REPAY_FNT: VARCHAR(600)
FEATURE_REPAY_MTH: VARCHAR(600)
FEATURE_REPAY_WK: VARCHAR(600)
FEATURE_SALARY_DIR: VARCHAR(600)
FEATURE_SPLIT: VARCHAR(600)
FEATURE_TRN_ACC: VARCHAR(600)
FEE_DETAIL: VARCHAR(8000)
FULL_DOC_FLG: VARCHAR(600)
INT_IN_ADVANCE_FLG: VARCHAR(600)
INTEGRATION_ID: VARCHAR(600)
INV_FLG: VARCHAR(600)
NO_DOC_FLG: VARCHAR(600)
NSW: VARCHAR(600)
NT: VARCHAR(600)
OFFSET: VARCHAR(600)
ONGOING_CYCLE: VARCHAR(4500)
OO_FLG: VARCHAR(600)
PART_NUM: VARCHAR(600)
PAYG_LOW_DOC_REQ: VARCHAR(600)
PISCES_NAME: VARCHAR(600)
PROD_NAME: VARCHAR(600)
PRODUCT_CLASS: VARCHAR(600)
PROF: VARCHAR(600)
QLD: VARCHAR(600)
RATE_DETAILS: VARCHAR(600)
REDRAW: VARCHAR(600)
REPAY_OPTION: VARCHAR(600)
RESERVABLE_FLG: VARCHAR(600)
REVERSE_MORTGAGE_FLG: VARCHAR(600)
SA: VARCHAR(600)
SKIP_FLG: VARCHAR(600)
TAS: VARCHAR(600)
VENDOR_NAME: VARCHAR(600)
VENDR_PART_NUM: VARCHAR(600)
VIC: VARCHAR(600)
VISIBLE_FLG: VARCHAR(600)
WA: VARCHAR(600)
NON_FLEX_CRM_PERSON:
+full_refresh: true
# Override column types
+column_types:
ETL_PROC_WID: NUMBER(38,0)
ROW_WID: NUMBER(38,0)
INTEGRATION_ID: VARCHAR(800)
DATASOURCE_NUM_ID: NUMBER(10,0)
CREATED: TIMESTAMP_NTZ(9)
TITLE: VARCHAR(800)
FST_NAME: VARCHAR(800)
LAST_NAME: VARCHAR(800)
MID_NAME: VARCHAR(800)
BIRTH_DT: TIMESTAMP_NTZ(9)
EMAIL_ADDR: VARCHAR(800)
ALT_EMAIL_ADDR: VARCHAR(800)
FULL_NAME: VARCHAR(800)
JOB_TITLE: VARCHAR(800)
MARITAL_STAT_CD: VARCHAR(800)
PREF_COMM_MEDIA: VARCHAR(800)
SEX_MF: VARCHAR(800)
ST_ADDRESS: VARCHAR(800)
CITY: VARCHAR(800)
STATE: VARCHAR(800)
ZIPCODE: VARCHAR(800)
COUNTRY: VARCHAR(800)
WORK_PH_NUM: VARCHAR(800)
FAX_PH_NUM: VARCHAR(800)
SUPPRESS_EMAIL_FLG: VARCHAR(50)
SUPPRESS_FAX_FLG: VARCHAR(50)
SUPPRESS_CALL_FLG: VARCHAR(50)
SUPPRESS_MAIL_FLG: VARCHAR(50)
HOUSEHOLD_CONTACT_FLG: VARCHAR(50)
BEST_CALL_TIME: VARCHAR(800)
CELL_PH_NUM: VARCHAR(800)
ALIAS_NAME: VARCHAR(800)
SPOUSE_ID: VARCHAR(800)
SPOUSE_FST_NAME: VARCHAR(800)
SPOUSE_MID_NAME: VARCHAR(800)
SPOUSE_LAST_NAME: VARCHAR(800)
REL_TYPE_CD: VARCHAR(800)
CONSUMER_FLG: VARCHAR(4)
TAM_CONTACT_DT: TIMESTAMP_NTZ(9)
TAM_CONTACT_STATUS: VARCHAR(4)
OCCUPATION: VARCHAR(800)
SELF_EMPLOYED_FLG: VARCHAR(50)
PR_POSTN_ID: VARCHAR(800)
HOME_PH_NUM: VARCHAR(800)
EMP_FLG: VARCHAR(4)
HAVEN_TYPE: VARCHAR(800)
DO_NOT_CONTACT: VARCHAR(800)
UNSUB_GREEN: VARCHAR(1)
UNSUB_AMBER: VARCHAR(1)
UNSUB_HAVEN: VARCHAR(1)
UNSUB_BIRTHDAY: VARCHAR(1)
UNSUB_CHRISTMAS: VARCHAR(1)
UNSUB_RATE_ALERT: VARCHAR(1)
RATE_ALERT_ST_DT: DATE
PR_PER_ADDR_ID: VARCHAR(800)
STATUS_CD: VARCHAR(120)
MKTG_COMMERCIAL_FLG: VARCHAR(50)
EMAIL_STATUS: VARCHAR(800)
X_onedb_DO_NOT_CROSS_SELL_FLG_2: VARCHAR(50)
NUM_DEPENDENTS: VARCHAR(50)
BROKER_DO_NOT_CONTACT_FLG: VARCHAR(50)
UNSUB_SMART: VARCHAR(50)
GREEN_RCNT_MKT_DT: DATE
LOAN_TRACK_RCNT_MKT_DT: DATE
WELCOME_SENT_DT: DATE
SMART_RCNT_MKT_DT: DATE
CAR_LOAN_SENT_DT: DATE
MKTG_VALID_EMAIL: VARCHAR(1)
MKTG_VALID_NAME: VARCHAR(1)
MKTG_VALID_ADDR: VARCHAR(1)
DELETED: VARCHAR(50)
DO_NOT_OFFER_CAR_LOAN: VARCHAR(1)
FLEX_LOB:
+full_refresh: true
# Override column types
+column_types:
ROW_WID: NUMBER(10,0)
DATASOURCE_NUM_ID: NUMBER(10,0)
INTEGRATION_ID: VARCHAR(800)
LOB: VARCHAR(800)
NON_FLEX_WC_POSITION:
+full_refresh: true
# Override column types
+column_types:
DATASOURCE_NUM_ID: NUMBER(10,0)
ETL_PROC_WID: NUMBER(10,0)
INTEGRATION_ID: VARCHAR2(30 CHAR)
ROW_WID: NUMBER(10,0)
TYPE_FLG: CHAR(1 CHAR)
DIVN_NAME: VARCHAR2(100 CHAR)
EMP_FST_NAME: VARCHAR2(50 CHAR)
EMP_ID: VARCHAR2(15 CHAR)
EMP_LAST_NAME: VARCHAR2(50 CHAR)
EMP_LOGIN: VARCHAR2(50 CHAR)
EMP_MID_NAME: VARCHAR2(50 CHAR)
PAR_INTEGRATION_ID: VARCHAR2(30 CHAR)
POSITION_NAME: VARCHAR2(50 CHAR)
POSTN_TYPE_CD: VARCHAR2(30 CHAR)
VIS_BU_ID: VARCHAR2(15 CHAR)
VIS_POS_ID: VARCHAR2(15 CHAR)
VIS_PR_EMP_ID: VARCHAR2(15 CHAR)
DESC_TEXT: VARCHAR2(50 CHAR)
COST_CENTER: VARCHAR2(5 CHAR)
ORG_NAME: VARCHAR2(100 CHAR)
ORG_ADDR: VARCHAR2(200 CHAR)
OU_ID: VARCHAR2(15 CHAR)
ACQ_TYPE: VARCHAR2(20 CHAR)
ACQUIRED_DT: DATE
ORG_TYPE: VARCHAR2(30 CHAR)
CAMP_BILL_AUTH: VARCHAR2(30 CHAR)
CAMP_START_DT: DATE
CAMP_END_DT: DATE
CREATED_DT: DATE
HAVEN_START_DT: DATE
HAVEN_END_DT: DATE
LW_FLG: CHAR(1 CHAR)
OFFICE_BEARER_FLG: CHAR(1 CHAR)
GREEN_STATUS: VARCHAR2(30 CHAR)
GREEN_START_DT: DATE
GREEN_END_DT: DATE
AMBER_STATUS: VARCHAR2(30 CHAR)
AMBER_START_DT: DATE
AMBER_END_DT: DATE
RED_STATUS: VARCHAR2(30 CHAR)
RED_START_DT: DATE
RED_END_DT: DATE
HAVEN_STATUS: VARCHAR2(30 CHAR)
BIRTHDAY_STATUS: VARCHAR2(30 CHAR)
BIRTHDAY_START_DT: DATE
BIRTHDAY_END_DT: DATE
CHRISTMAS_STATUS: VARCHAR2(30 CHAR)
CHRISTMAS_START_DT: DATE
CHRISTMAS_END_DT: DATE
RATE_ALERT_STATUS: VARCHAR2(30 CHAR)
RATE_ALERT_START_DT: DATE
RATE_ALERT_END_DT: DATE
GREEN_TYPE: VARCHAR2(15 CHAR)
AMBER_TYPE: VARCHAR2(15 CHAR)
PROGRAM_TYPE: VARCHAR2(30 CHAR)
BRM_EMP_ID: VARCHAR2(15 CHAR)
BRM_POSTN_ID: VARCHAR2(15 CHAR)
BRM_FULL_NAME: VARCHAR2(100 CHAR)
BRM_POSTN: VARCHAR2(50 CHAR)
LIFE_INS_STATUS: VARCHAR2(30 CHAR)
LIFE_INS_START_DT: DATE
LIFE_INS_END_DT: DATE
LOAN_TRACK_STATUS: VARCHAR2(30 CHAR)
LOAN_TRACK_START_DT: DATE
LOAN_TRACK_END_DT: DATE
WELCOME_STATUS: VARCHAR2(30 CHAR)
WELCOME_START_DT: DATE
WELCOME_END_DT: DATE
PROCURE_STATUS: VARCHAR2(30 CHAR)
PROCURE_START_DT: DATE
PROCURE_END_DT: DATE
PROSPECT_STATUS: VARCHAR2(30 CHAR)
PROSPECT_START_DT: DATE
PROSPECT_END_DT: DATE
REVIEW_STATUS: VARCHAR2(30 CHAR)
REVIEW_START_DT: DATE
REVIEW_END_DT: DATE
ANNIVERSARY_STATUS: VARCHAR2(30 CHAR)
ANNIVERSARY_START_DT: DATE
ANNIVERSARY_END_DT: DATE
SETTLEMENT_STATUS: VARCHAR2(30 CHAR)
SETTLEMENT_START_DT: DATE
SETTLEMENT_END_DT: DATE
ALLIANZ_STATUS: VARCHAR2(30 CHAR)
ALLIANZ_START_DT: DATE
ALLIANZ_END_DT: DATE
DEPR_STATUS: VARCHAR2(30 CHAR)
DEPR_START_DT: DATE
DEPR_END_DT: DATE
CAR_LOAN_STATUS: VARCHAR2(30 CHAR)
CAR_LOAN_START_DT: DATE
CAR_LOAN_END_DT: DATE
VEDA_STATUS: VARCHAR2(30 CHAR)
VEDA_START_DT: DATE
EMAIL_ADDR: VARCHAR2(350 CHAR)
MKTG_BILL_OPTION: VARCHAR2(30 CHAR)
BUSINESS_STATUS: VARCHAR2(30 CHAR)
BUSINESS_START_DT: DATE
BUSINESS_END_DT: DATE
RM_POSTN_ID: VARCHAR2(15 CHAR)
RM_POSTN: VARCHAR2(50 CHAR)
RM_EMP_ID: VARCHAR2(15 CHAR)
RM_FULL_NAME: VARCHAR2(100 CHAR)
CBDM_POSTN_ID: VARCHAR2(15 CHAR)
CBDM_POSTN: VARCHAR2(50 CHAR)
CBDM_EMP_ID: VARCHAR2(15 CHAR)
CBDM_FULL_NAME: VARCHAR2(100 CHAR)
NATIONAL_BDM_FLG: CHAR(1 CHAR)
CLIENTGOLIVE:
+full_refresh: true
# Override column types
+column_types:
CLIENT_ID: VARCHAR(800)
CLIENT: VARCHAR(800)
GOLIVE: DATE
GOLIVE_DK: NUMBER(10,0)
WC_ORG_LKP_CATEGORY:
+full_refresh: true
# Override column types
+column_types:
SALES_TEAM: VARCHAR(800)
CATEGORY: VARCHAR(800)
THRESHOLD_MIN: NUMBER(22,7)
THRESHOLD_MAX: NUMBER(22,7)
CATEGORY_DEFINITION: VARCHAR(800)
LINE_OF_BUSINESS: VARCHAR(800)
THIRD_PARTY_PERMISSIONS:
+full_refresh: true
# Override column types
+column_types:
ACCOUNT_NAME: VARCHAR(100)
BROKER_ID: VARCHAR(100)
ORG_ID: VARCHAR(100)
THIRD_PARTY_READER_ACCOUNTS:
+full_refresh: true
# Override column types
+column_types:
ACCOUNT_NAME: VARCHAR(100)
ACCOUNT_ID: VARCHAR(100)# Name your project! Project names should contain only lowercase characters and underscores. A good package name should reflect your organization's name or the intended use of these models
name: 'onedb_modern_analytics'
version: '1.0.0'
config-version: 2
# This setting configures which "profile" dbt uses for this project.
profile: 'snowflake-onedb'
# These configurations specify where dbt should look for different types of files.
# The `model-paths` config, for example, states that models in this project can be
# found in the "models/" directory. You probably won't need to change these!
model-paths: ["models"]
analysis-paths: ["analysis"]
test-paths: ["tests"]
seed-paths: ["data","seeds"]
macro-paths: ["macros"]
snapshot-paths: ["snapshots"]
target-path: "target" # directory which will store compiled SQL files
clean-targets: # directories to be removed by `dbt clean`
- "target"
- "dbt_modules"
vars:
last_run: "{{ batch_last_run_date() }}"
batch_name: master_batch
etl_proc_wid: "{{ etl_proc_wid() }}"
# Below on-run-end hook is for updating the status of the batch if any of the jobs fails.
on-run-start: "{{ project_setup() }}"
on-run-end: "{{ batch_results_update(results) }}"
# Configuring models
# In this config, we tell dbt to build all models in the onedb_modern_analytics directory
# as tables. These settings can be overridden in the individual model files
models:
onedb_modern_analytics:
# Applies to all files under models/
+persist_docs :
relation: true
columns: true
+copy_grants: true
# Applies to all files under models/datamarts/
datamarts:
materialized: table
transient: false
query_tag: dbt datamart query
analytics:
schema: EDM_AI
finance:
schema: EDM_AI
marketing:
schema: EDM_AI
sales:
schema: EDM_AI
external:
schema: EDM_EXTERNAL
external_org:
schema: EDM_EXTERNAL_ORG
# Applies to all files under models/staging/
staging:
# Prehook to logging the model execution in the Platform logging table.
+pre-hook: "{{job_logging_insert_update('In Progress')}}"
+post-hook: "{{job_logging_insert_update('Completed')}}"
schema: EDW_TRANSIENT
materialized: table
transient: false
query_tag: dbt staging query
position_dimension:
materialized: table
config:
schema: EDW_CONFIG
materialized: table
transient: false
query_tag: dbt config query
example:
schema: EDW_MODELED
materialized: table
transient: false
query_tag: dbt datawarehouse query
# Curated Layer
curated:
Flex:
schema: CURATED_FLEX
materialized: view
transient: false
query_tag: dbt curated layer
Hubspot:
schema: CURATED_HUBSPOT
materialized: view
transient: false
query_tag: dbt curated layer
Loanworks:
schema: CURATED_LOANWORKS
materialized: view
transient: false
query_tag: dbt curated layer
# Warehouse Layer
warehouse:
# Prehook to logging the model execution in the Platform logging table.
+pre-hook: "{{job_logging_insert_update('In Progress')}}"
+post-hook: "{{job_logging_insert_update('Completed')}}"
onedbHL:
schema: WH_onedbHL
materialized: table
transient: false
query_tag: dbt warehouse layer
analytics:
schema: WH_ANALYTICS
materialized: table
transient: false
query_tag: dbt warehouse layer
lookups:
schema: EDW_TRANSIENT
materialized: table
transient: true
nextgen:
schema: WH_NEXTGEN
materialized: table
transient: false
query_tag: dbt warehouse layer
securities:
schema: WH_SECURITIES
materialized: table
transient: false
query_tag: dbt warehouse layer
# Serving Layer
serving:
onedbHL:
schema: onedbHL
materialized: view
transient: false
query_tag: dbt serving layer
Analytics:
schema: ANALYTICS
materialized: view
transient: false
query_tag: dbt serving layer
Legacy_Staff:
schema: LEGACY_STAFF
materialized: view
transient: false
query_tag: dbt serving layer
Legacy_Members:
schema: LEGACY_MEMBERS
materialized: view
transient: false
query_tag: dbt serving layer
Nextgen:
schema: NEXTGEN
materialized: view
transient: false
query_tag: dbt serving layer
Securities:
schema: SECURITIES
materialized: view
transient: false
query_tag: dbt serving layer
# Below configurations are
snapshots:
onedb_modern_analytics:
staging:
+target_schema: RAW_CRM
datawarehouse:
seeds:
onedb_modern_analytics:
+schema: EDW_TRANSIENT
+quote_columns: false
# This configures NON_FLEX_PRODUCT_DATA.csv
NON_FLEX_PRODUCT_DATA:
+full_refresh: true
# Override column types
+column_types:
EFF_END_DT: VARCHAR(600)
EFF_START_DT: VARCHAR(600)
PROD_LN_WID: VARCHAR(768)
LAST_UPD: TIMESTAMP_NTZ(9)
ABN_REQ: VARCHAR(600)
ALOC_ASSETS_FLG: VARCHAR(600)
ACT: VARCHAR(600)
AOLM_NAME: VARCHAR(600)
AUTO_APP_CC: VARCHAR(600)
CREDIT_IMPAIRED_FLG: VARCHAR(600)
DESC_TEXT: VARCHAR(6144)
DETAIL_TYPE_CD: VARCHAR(600)
DFRD_EST_FEE: VARCHAR(600)
DISP_CMPNT_FLG: VARCHAR(600)
DISP_CMPNT_PRI_FLG: VARCHAR(600)
EQUITY_FLG: VARCHAR(600)
FEATURE_BPAY: VARCHAR(600)
FEATURE_BRIDGING: VARCHAR(600)
FEATURE_CONSTRUCTION: VARCHAR(600)
FEATURE_DEBIT_CARD: VARCHAR(600)
FEATURE_DIR_CREDIT: VARCHAR(600)
FEATURE_DIR_DEBIT: VARCHAR(600)
FEATURE_EARLY_REPAY: VARCHAR(600)
FEATURE_EFTPOS: VARCHAR(600)
FEATURE_INTEREST_CAP: VARCHAR(600)
FEATURE_LMI: VARCHAR(600)
FEATURE_LMI_CAPITALISE: VARCHAR(600)
FEATURE_LOC: VARCHAR(600)
FEATURE_NET_BANKING: VARCHAR(600)
FEATURE_PHONE_TRF: VARCHAR(600)
FEATURE_PORTABLE: VARCHAR(600)
FEATURE_POST: VARCHAR(600)
FEATURE_RATE_LOCK: VARCHAR(600)
FEATURE_REPAY_EXTRA: VARCHAR(600)
FEATURE_REPAY_FNT: VARCHAR(600)
FEATURE_REPAY_MTH: VARCHAR(600)
FEATURE_REPAY_WK: VARCHAR(600)
FEATURE_SALARY_DIR: VARCHAR(600)
FEATURE_SPLIT: VARCHAR(600)
FEATURE_TRN_ACC: VARCHAR(600)
FEE_DETAIL: VARCHAR(8000)
FULL_DOC_FLG: VARCHAR(600)
INT_IN_ADVANCE_FLG: VARCHAR(600)
INTEGRATION_ID: VARCHAR(600)
INV_FLG: VARCHAR(600)
NO_DOC_FLG: VARCHAR(600)
NSW: VARCHAR(600)
NT: VARCHAR(600)
OFFSET: VARCHAR(600)
ONGOING_CYCLE: VARCHAR(4500)
OO_FLG: VARCHAR(600)
PART_NUM: VARCHAR(600)
PAYG_LOW_DOC_REQ: VARCHAR(600)
PISCES_NAME: VARCHAR(600)
PROD_NAME: VARCHAR(600)
PRODUCT_CLASS: VARCHAR(600)
PROF: VARCHAR(600)
QLD: VARCHAR(600)
RATE_DETAILS: VARCHAR(600)
REDRAW: VARCHAR(600)
REPAY_OPTION: VARCHAR(600)
RESERVABLE_FLG: VARCHAR(600)
REVERSE_MORTGAGE_FLG: VARCHAR(600)
SA: VARCHAR(600)
SKIP_FLG: VARCHAR(600)
TAS: VARCHAR(600)
VENDOR_NAME: VARCHAR(600)
VENDR_PART_NUM: VARCHAR(600)
VIC: VARCHAR(600)
VISIBLE_FLG: VARCHAR(600)
WA: VARCHAR(600)
NON_FLEX_CRM_PERSON:
+full_refresh: true
# Override column types
+column_types:
ETL_PROC_WID: NUMBER(38,0)
ROW_WID: NUMBER(38,0)
INTEGRATION_ID: VARCHAR(800)
DATASOURCE_NUM_ID: NUMBER(10,0)
CREATED: TIMESTAMP_NTZ(9)
TITLE: VARCHAR(800)
FST_NAME: VARCHAR(800)
LAST_NAME: VARCHAR(800)
MID_NAME: VARCHAR(800)
BIRTH_DT: TIMESTAMP_NTZ(9)
EMAIL_ADDR: VARCHAR(800)
ALT_EMAIL_ADDR: VARCHAR(800)
FULL_NAME: VARCHAR(800)
JOB_TITLE: VARCHAR(800)
MARITAL_STAT_CD: VARCHAR(800)
PREF_COMM_MEDIA: VARCHAR(800)
SEX_MF: VARCHAR(800)
ST_ADDRESS: VARCHAR(800)
CITY: VARCHAR(800)
STATE: VARCHAR(800)
ZIPCODE: VARCHAR(800)
COUNTRY: VARCHAR(800)
WORK_PH_NUM: VARCHAR(800)
FAX_PH_NUM: VARCHAR(800)
SUPPRESS_EMAIL_FLG: VARCHAR(50)
SUPPRESS_FAX_FLG: VARCHAR(50)
SUPPRESS_CALL_FLG: VARCHAR(50)
SUPPRESS_MAIL_FLG: VARCHAR(50)
HOUSEHOLD_CONTACT_FLG: VARCHAR(50)
BEST_CALL_TIME: VARCHAR(800)
CELL_PH_NUM: VARCHAR(800)
ALIAS_NAME: VARCHAR(800)
SPOUSE_ID: VARCHAR(800)
SPOUSE_FST_NAME: VARCHAR(800)
SPOUSE_MID_NAME: VARCHAR(800)
SPOUSE_LAST_NAME: VARCHAR(800)
REL_TYPE_CD: VARCHAR(800)
CONSUMER_FLG: VARCHAR(4)
TAM_CONTACT_DT: TIMESTAMP_NTZ(9)
TAM_CONTACT_STATUS: VARCHAR(4)
OCCUPATION: VARCHAR(800)
SELF_EMPLOYED_FLG: VARCHAR(50)
PR_POSTN_ID: VARCHAR(800)
HOME_PH_NUM: VARCHAR(800)
EMP_FLG: VARCHAR(4)
HAVEN_TYPE: VARCHAR(800)
DO_NOT_CONTACT: VARCHAR(800)
UNSUB_GREEN: VARCHAR(1)
UNSUB_AMBER: VARCHAR(1)
UNSUB_HAVEN: VARCHAR(1)
UNSUB_BIRTHDAY: VARCHAR(1)
UNSUB_CHRISTMAS: VARCHAR(1)
UNSUB_RATE_ALERT: VARCHAR(1)
RATE_ALERT_ST_DT: DATE
PR_PER_ADDR_ID: VARCHAR(800)
STATUS_CD: VARCHAR(120)
MKTG_COMMERCIAL_FLG: VARCHAR(50)
EMAIL_STATUS: VARCHAR(800)
X_onedb_DO_NOT_CROSS_SELL_FLG_2: VARCHAR(50)
NUM_DEPENDENTS: VARCHAR(50)
BROKER_DO_NOT_CONTACT_FLG: VARCHAR(50)
UNSUB_SMART: VARCHAR(50)
GREEN_RCNT_MKT_DT: DATE
LOAN_TRACK_RCNT_MKT_DT: DATE
WELCOME_SENT_DT: DATE
SMART_RCNT_MKT_DT: DATE
CAR_LOAN_SENT_DT: DATE
MKTG_VALID_EMAIL: VARCHAR(1)
MKTG_VALID_NAME: VARCHAR(1)
MKTG_VALID_ADDR: VARCHAR(1)
DELETED: VARCHAR(50)
DO_NOT_OFFER_CAR_LOAN: VARCHAR(1)
FLEX_LOB:
+full_refresh: true
# Override column types
+column_types:
ROW_WID: NUMBER(10,0)
DATASOURCE_NUM_ID: NUMBER(10,0)
INTEGRATION_ID: VARCHAR(800)
LOB: VARCHAR(800)
NON_FLEX_WC_POSITION:
+full_refresh: true
# Override column types
+column_types:
DATASOURCE_NUM_ID: NUMBER(10,0)
ETL_PROC_WID: NUMBER(10,0)
INTEGRATION_ID: VARCHAR2(30 CHAR)
ROW_WID: NUMBER(10,0)
TYPE_FLG: CHAR(1 CHAR)
DIVN_NAME: VARCHAR2(100 CHAR)
EMP_FST_NAME: VARCHAR2(50 CHAR)
EMP_ID: VARCHAR2(15 CHAR)
EMP_LAST_NAME: VARCHAR2(50 CHAR)
EMP_LOGIN: VARCHAR2(50 CHAR)
EMP_MID_NAME: VARCHAR2(50 CHAR)
PAR_INTEGRATION_ID: VARCHAR2(30 CHAR)
POSITION_NAME: VARCHAR2(50 CHAR)
POSTN_TYPE_CD: VARCHAR2(30 CHAR)
VIS_BU_ID: VARCHAR2(15 CHAR)
VIS_POS_ID: VARCHAR2(15 CHAR)
VIS_PR_EMP_ID: VARCHAR2(15 CHAR)
DESC_TEXT: VARCHAR2(50 CHAR)
COST_CENTER: VARCHAR2(5 CHAR)
ORG_NAME: VARCHAR2(100 CHAR)
ORG_ADDR: VARCHAR2(200 CHAR)
OU_ID: VARCHAR2(15 CHAR)
ACQ_TYPE: VARCHAR2(20 CHAR)
ACQUIRED_DT: DATE
ORG_TYPE: VARCHAR2(30 CHAR)
CAMP_BILL_AUTH: VARCHAR2(30 CHAR)
CAMP_START_DT: DATE
CAMP_END_DT: DATE
CREATED_DT: DATE
HAVEN_START_DT: DATE
HAVEN_END_DT: DATE
LW_FLG: CHAR(1 CHAR)
OFFICE_BEARER_FLG: CHAR(1 CHAR)
GREEN_STATUS: VARCHAR2(30 CHAR)
GREEN_START_DT: DATE
GREEN_END_DT: DATE
AMBER_STATUS: VARCHAR2(30 CHAR)
AMBER_START_DT: DATE
AMBER_END_DT: DATE
RED_STATUS: VARCHAR2(30 CHAR)
RED_START_DT: DATE
RED_END_DT: DATE
HAVEN_STATUS: VARCHAR2(30 CHAR)
BIRTHDAY_STATUS: VARCHAR2(30 CHAR)
BIRTHDAY_START_DT: DATE
BIRTHDAY_END_DT: DATE
CHRISTMAS_STATUS: VARCHAR2(30 CHAR)
CHRISTMAS_START_DT: DATE
CHRISTMAS_END_DT: DATE
RATE_ALERT_STATUS: VARCHAR2(30 CHAR)
RATE_ALERT_START_DT: DATE
RATE_ALERT_END_DT: DATE
GREEN_TYPE: VARCHAR2(15 CHAR)
AMBER_TYPE: VARCHAR2(15 CHAR)
PROGRAM_TYPE: VARCHAR2(30 CHAR)
BRM_EMP_ID: VARCHAR2(15 CHAR)
BRM_POSTN_ID: VARCHAR2(15 CHAR)
BRM_FULL_NAME: VARCHAR2(100 CHAR)
BRM_POSTN: VARCHAR2(50 CHAR)
LIFE_INS_STATUS: VARCHAR2(30 CHAR)
LIFE_INS_START_DT: DATE
LIFE_INS_END_DT: DATE
LOAN_TRACK_STATUS: VARCHAR2(30 CHAR)
LOAN_TRACK_START_DT: DATE
LOAN_TRACK_END_DT: DATE
WELCOME_STATUS: VARCHAR2(30 CHAR)
WELCOME_START_DT: DATE
WELCOME_END_DT: DATE
PROCURE_STATUS: VARCHAR2(30 CHAR)
PROCURE_START_DT: DATE
PROCURE_END_DT: DATE
PROSPECT_STATUS: VARCHAR2(30 CHAR)
PROSPECT_START_DT: DATE
PROSPECT_END_DT: DATE
REVIEW_STATUS: VARCHAR2(30 CHAR)
REVIEW_START_DT: DATE
REVIEW_END_DT: DATE
ANNIVERSARY_STATUS: VARCHAR2(30 CHAR)
ANNIVERSARY_START_DT: DATE
ANNIVERSARY_END_DT: DATE
SETTLEMENT_STATUS: VARCHAR2(30 CHAR)
SETTLEMENT_START_DT: DATE
SETTLEMENT_END_DT: DATE
ALLIANZ_STATUS: VARCHAR2(30 CHAR)
ALLIANZ_START_DT: DATE
ALLIANZ_END_DT: DATE
DEPR_STATUS: VARCHAR2(30 CHAR)
DEPR_START_DT: DATE
DEPR_END_DT: DATE
CAR_LOAN_STATUS: VARCHAR2(30 CHAR)
CAR_LOAN_START_DT: DATE
CAR_LOAN_END_DT: DATE
VEDA_STATUS: VARCHAR2(30 CHAR)
VEDA_START_DT: DATE
EMAIL_ADDR: VARCHAR2(350 CHAR)
MKTG_BILL_OPTION: VARCHAR2(30 CHAR)
BUSINESS_STATUS: VARCHAR2(30 CHAR)
BUSINESS_START_DT: DATE
BUSINESS_END_DT: DATE
RM_POSTN_ID: VARCHAR2(15 CHAR)
RM_POSTN: VARCHAR2(50 CHAR)
RM_EMP_ID: VARCHAR2(15 CHAR)
RM_FULL_NAME: VARCHAR2(100 CHAR)
CBDM_POSTN_ID: VARCHAR2(15 CHAR)
CBDM_POSTN: VARCHAR2(50 CHAR)
CBDM_EMP_ID: VARCHAR2(15 CHAR)
CBDM_FULL_NAME: VARCHAR2(100 CHAR)
NATIONAL_BDM_FLG: CHAR(1 CHAR)
CLIENTGOLIVE:
+full_refresh: true
# Override column types
+column_types:
CLIENT_ID: VARCHAR(800)
CLIENT: VARCHAR(800)
GOLIVE: DATE
GOLIVE_DK: NUMBER(10,0)
WC_ORG_LKP_CATEGORY:
+full_refresh: true
# Override column types
+column_types:
SALES_TEAM: VARCHAR(800)
CATEGORY: VARCHAR(800)
THRESHOLD_MIN: NUMBER(22,7)
THRESHOLD_MAX: NUMBER(22,7)
CATEGORY_DEFINITION: VARCHAR(800)
LINE_OF_BUSINESS: VARCHAR(800)
THIRD_PARTY_PERMISSIONS:
+full_refresh: true
# Override column types
+column_types:
ACCOUNT_NAME: VARCHAR(100)
BROKER_ID: VARCHAR(100)
ORG_ID: VARCHAR(100)
THIRD_PARTY_READER_ACCOUNTS:
+full_refresh: true
# Override column types
+column_types:
ACCOUNT_NAME: VARCHAR(100)
ACCOUNT_ID: VARCHAR(100)# Name your project! Project names should contain only lowercase characters and underscores. A good package name should reflect your organization's name or the intended use of these models
name: 'onedb_modern_analytics'
version: '1.0.0'
config-version: 2
# This setting configures which "profile" dbt uses for this project.
profile: 'snowflake-onedb'
# These configurations specify where dbt should look for different types of files.
# The `model-paths` config, for example, states that models in this project can be
# found in the "models/" directory. You probably won't need to change these!
model-paths: ["models"]
analysis-paths: ["analysis"]
test-paths: ["tests"]
seed-paths: ["data","seeds"]
macro-paths: ["macros"]
snapshot-paths: ["snapshots"]
target-path: "target" # directory which will store compiled SQL files
clean-targets: # directories to be removed by `dbt clean`
- "target"
- "dbt_modules"
vars:
last_run: "{{ batch_last_run_date() }}"
batch_name: master_batch
etl_proc_wid: "{{ etl_proc_wid() }}"
# Below on-run-end hook is for updating the status of the batch if any of the jobs fails.
on-run-start: "{{ project_setup() }}"
on-run-end: "{{ batch_results_update(results) }}"
# Configuring models
# In this config, we tell dbt to build all models in the onedb_modern_analytics directory
# as tables. These settings can be overridden in the individual model files
models:
onedb_modern_analytics:
# Applies to all files under models/
+persist_docs :
relation: true
columns: true
+copy_grants: true
# Applies to all files under models/datamarts/
datamarts:
materialized: table
transient: false
query_tag: dbt datamart query
analytics:
schema: EDM_AI
finance:
schema: EDM_AI
marketing:
schema: EDM_AI
sales:
schema: EDM_AI
external:
schema: EDM_EXTERNAL
external_org:
schema: EDM_EXTERNAL_ORG
# Applies to all files under models/staging/
staging:
# Prehook to logging the model execution in the Platform logging table.
+pre-hook: "{{job_logging_insert_update('In Progress')}}"
+post-hook: "{{job_logging_insert_update('Completed')}}"
schema: EDW_TRANSIENT
materialized: table
transient: false
query_tag: dbt staging query
position_dimension:
materialized: table
config:
schema: EDW_CONFIG
materialized: table
transient: false
query_tag: dbt config query
example:
schema: EDW_MODELED
materialized: table
transient: false
query_tag: dbt datawarehouse query
# Curated Layer
curated:
Flex:
schema: CURATED_FLEX
materialized: view
transient: false
query_tag: dbt curated layer
Hubspot:
schema: CURATED_HUBSPOT
materialized: view
transient: false
query_tag: dbt curated layer
Loanworks:
schema: CURATED_LOANWORKS
materialized: view
transient: false
query_tag: dbt curated layer
# Warehouse Layer
warehouse:
# Prehook to logging the model execution in the Platform logging table.
+pre-hook: "{{job_logging_insert_update('In Progress')}}"
+post-hook: "{{job_logging_insert_update('Completed')}}"
onedbHL:
schema: WH_onedbHL
materialized: table
transient: false
query_tag: dbt warehouse layer
analytics:
schema: WH_ANALYTICS
materialized: table
transient: false
query_tag: dbt warehouse layer
lookups:
schema: EDW_TRANSIENT
materialized: table
transient: true
nextgen:
schema: WH_NEXTGEN
materialized: table
transient: false
query_tag: dbt warehouse layer
securities:
schema: WH_SECURITIES
materialized: table
transient: false
query_tag: dbt warehouse layer
# Serving Layer
serving:
onedbHL:
schema: onedbHL
materialized: view
transient: false
query_tag: dbt serving layer
Analytics:
schema: ANALYTICS
materialized: view
transient: false
query_tag: dbt serving layer
Legacy_Staff:
schema: LEGACY_STAFF
materialized: view
transient: false
query_tag: dbt serving layer
Legacy_Members:
schema: LEGACY_MEMBERS
materialized: view
transient: false
query_tag: dbt serving layer
Nextgen:
schema: NEXTGEN
materialized: view
transient: false
query_tag: dbt serving layer
Securities:
schema: SECURITIES
materialized: view
transient: false
query_tag: dbt serving layer
# Below configurations are
snapshots:
onedb_modern_analytics:
staging:
+target_schema: RAW_CRM
datawarehouse:
seeds:
onedb_modern_analytics:
+schema: EDW_TRANSIENT
+quote_columns: false
# This configures NON_FLEX_PRODUCT_DATA.csv
NON_FLEX_PRODUCT_DATA:
+full_refresh: true
# Override column types
+column_types:
EFF_END_DT: VARCHAR(600)
EFF_START_DT: VARCHAR(600)
PROD_LN_WID: VARCHAR(768)
LAST_UPD: TIMESTAMP_NTZ(9)
ABN_REQ: VARCHAR(600)
ALOC_ASSETS_FLG: VARCHAR(600)
ACT: VARCHAR(600)
AOLM_NAME: VARCHAR(600)
AUTO_APP_CC: VARCHAR(600)
CREDIT_IMPAIRED_FLG: VARCHAR(600)
DESC_TEXT: VARCHAR(6144)
DETAIL_TYPE_CD: VARCHAR(600)
DFRD_EST_FEE: VARCHAR(600)
DISP_CMPNT_FLG: VARCHAR(600)
DISP_CMPNT_PRI_FLG: VARCHAR(600)
EQUITY_FLG: VARCHAR(600)
FEATURE_BPAY: VARCHAR(600)
FEATURE_BRIDGING: VARCHAR(600)
FEATURE_CONSTRUCTION: VARCHAR(600)
FEATURE_DEBIT_CARD: VARCHAR(600)
FEATURE_DIR_CREDIT: VARCHAR(600)
FEATURE_DIR_DEBIT: VARCHAR(600)
FEATURE_EARLY_REPAY: VARCHAR(600)
FEATURE_EFTPOS: VARCHAR(600)
FEATURE_INTEREST_CAP: VARCHAR(600)
FEATURE_LMI: VARCHAR(600)
FEATURE_LMI_CAPITALISE: VARCHAR(600)
FEATURE_LOC: VARCHAR(600)
FEATURE_NET_BANKING: VARCHAR(600)
FEATURE_PHONE_TRF: VARCHAR(600)
FEATURE_PORTABLE: VARCHAR(600)
FEATURE_POST: VARCHAR(600)
FEATURE_RATE_LOCK: VARCHAR(600)
FEATURE_REPAY_EXTRA: VARCHAR(600)
FEATURE_REPAY_FNT: VARCHAR(600)
FEATURE_REPAY_MTH: VARCHAR(600)
FEATURE_REPAY_WK: VARCHAR(600)
FEATURE_SALARY_DIR: VARCHAR(600)
FEATURE_SPLIT: VARCHAR(600)
FEATURE_TRN_ACC: VARCHAR(600)
FEE_DETAIL: VARCHAR(8000)
FULL_DOC_FLG: VARCHAR(600)
INT_IN_ADVANCE_FLG: VARCHAR(600)
INTEGRATION_ID: VARCHAR(600)
INV_FLG: VARCHAR(600)
NO_DOC_FLG: VARCHAR(600)
NSW: VARCHAR(600)
NT: VARCHAR(600)
OFFSET: VARCHAR(600)
ONGOING_CYCLE: VARCHAR(4500)
OO_FLG: VARCHAR(600)
PART_NUM: VARCHAR(600)
PAYG_LOW_DOC_REQ: VARCHAR(600)
PISCES_NAME: VARCHAR(600)
PROD_NAME: VARCHAR(600)
PRODUCT_CLASS: VARCHAR(600)
PROF: VARCHAR(600)
QLD: VARCHAR(600)
RATE_DETAILS: VARCHAR(600)
REDRAW: VARCHAR(600)
REPAY_OPTION: VARCHAR(600)
RESERVABLE_FLG: VARCHAR(600)
REVERSE_MORTGAGE_FLG: VARCHAR(600)
SA: VARCHAR(600)
SKIP_FLG: VARCHAR(600)
TAS: VARCHAR(600)
VENDOR_NAME: VARCHAR(600)
VENDR_PART_NUM: VARCHAR(600)
VIC: VARCHAR(600)
VISIBLE_FLG: VARCHAR(600)
WA: VARCHAR(600)
NON_FLEX_CRM_PERSON:
+full_refresh: true
# Override column types
+column_types:
ETL_PROC_WID: NUMBER(38,0)
ROW_WID: NUMBER(38,0)
INTEGRATION_ID: VARCHAR(800)
DATASOURCE_NUM_ID: NUMBER(10,0)
CREATED: TIMESTAMP_NTZ(9)
TITLE: VARCHAR(800)
FST_NAME: VARCHAR(800)
LAST_NAME: VARCHAR(800)
MID_NAME: VARCHAR(800)
BIRTH_DT: TIMESTAMP_NTZ(9)
EMAIL_ADDR: VARCHAR(800)
ALT_EMAIL_ADDR: VARCHAR(800)
FULL_NAME: VARCHAR(800)
JOB_TITLE: VARCHAR(800)
MARITAL_STAT_CD: VARCHAR(800)
PREF_COMM_MEDIA: VARCHAR(800)
SEX_MF: VARCHAR(800)
ST_ADDRESS: VARCHAR(800)
CITY: VARCHAR(800)
STATE: VARCHAR(800)
ZIPCODE: VARCHAR(800)
COUNTRY: VARCHAR(800)
WORK_PH_NUM: VARCHAR(800)
FAX_PH_NUM: VARCHAR(800)
SUPPRESS_EMAIL_FLG: VARCHAR(50)
SUPPRESS_FAX_FLG: VARCHAR(50)
SUPPRESS_CALL_FLG: VARCHAR(50)
SUPPRESS_MAIL_FLG: VARCHAR(50)
HOUSEHOLD_CONTACT_FLG: VARCHAR(50)
BEST_CALL_TIME: VARCHAR(800)
CELL_PH_NUM: VARCHAR(800)
ALIAS_NAME: VARCHAR(800)
SPOUSE_ID: VARCHAR(800)
SPOUSE_FST_NAME: VARCHAR(800)
SPOUSE_MID_NAME: VARCHAR(800)
SPOUSE_LAST_NAME: VARCHAR(800)
REL_TYPE_CD: VARCHAR(800)
CONSUMER_FLG: VARCHAR(4)
TAM_CONTACT_DT: TIMESTAMP_NTZ(9)
TAM_CONTACT_STATUS: VARCHAR(4)
OCCUPATION: VARCHAR(800)
SELF_EMPLOYED_FLG: VARCHAR(50)
PR_POSTN_ID: VARCHAR(800)
HOME_PH_NUM: VARCHAR(800)
EMP_FLG: VARCHAR(4)
HAVEN_TYPE: VARCHAR(800)
DO_NOT_CONTACT: VARCHAR(800)
UNSUB_GREEN: VARCHAR(1)
UNSUB_AMBER: VARCHAR(1)
UNSUB_HAVEN: VARCHAR(1)
UNSUB_BIRTHDAY: VARCHAR(1)
UNSUB_CHRISTMAS: VARCHAR(1)
UNSUB_RATE_ALERT: VARCHAR(1)
RATE_ALERT_ST_DT: DATE
PR_PER_ADDR_ID: VARCHAR(800)
STATUS_CD: VARCHAR(120)
MKTG_COMMERCIAL_FLG: VARCHAR(50)
EMAIL_STATUS: VARCHAR(800)
X_onedb_DO_NOT_CROSS_SELL_FLG_2: VARCHAR(50)
NUM_DEPENDENTS: VARCHAR(50)
BROKER_DO_NOT_CONTACT_FLG: VARCHAR(50)
UNSUB_SMART: VARCHAR(50)
GREEN_RCNT_MKT_DT: DATE
LOAN_TRACK_RCNT_MKT_DT: DATE
WELCOME_SENT_DT: DATE
SMART_RCNT_MKT_DT: DATE
CAR_LOAN_SENT_DT: DATE
MKTG_VALID_EMAIL: VARCHAR(1)
MKTG_VALID_NAME: VARCHAR(1)
MKTG_VALID_ADDR: VARCHAR(1)
DELETED: VARCHAR(50)
DO_NOT_OFFER_CAR_LOAN: VARCHAR(1)
FLEX_LOB:
+full_refresh: true
# Override column types
+column_types:
ROW_WID: NUMBER(10,0)
DATASOURCE_NUM_ID: NUMBER(10,0)
INTEGRATION_ID: VARCHAR(800)
LOB: VARCHAR(800)
NON_FLEX_WC_POSITION:
+full_refresh: true
# Override column types
+column_types:
DATASOURCE_NUM_ID: NUMBER(10,0)
ETL_PROC_WID: NUMBER(10,0)
INTEGRATION_ID: VARCHAR2(30 CHAR)
ROW_WID: NUMBER(10,0)
TYPE_FLG: CHAR(1 CHAR)
DIVN_NAME: VARCHAR2(100 CHAR)
EMP_FST_NAME: VARCHAR2(50 CHAR)
EMP_ID: VARCHAR2(15 CHAR)
EMP_LAST_NAME: VARCHAR2(50 CHAR)
EMP_LOGIN: VARCHAR2(50 CHAR)
EMP_MID_NAME: VARCHAR2(50 CHAR)
PAR_INTEGRATION_ID: VARCHAR2(30 CHAR)
POSITION_NAME: VARCHAR2(50 CHAR)
POSTN_TYPE_CD: VARCHAR2(30 CHAR)
VIS_BU_ID: VARCHAR2(15 CHAR)
VIS_POS_ID: VARCHAR2(15 CHAR)
VIS_PR_EMP_ID: VARCHAR2(15 CHAR)
DESC_TEXT: VARCHAR2(50 CHAR)
COST_CENTER: VARCHAR2(5 CHAR)
ORG_NAME: VARCHAR2(100 CHAR)
ORG_ADDR: VARCHAR2(200 CHAR)
OU_ID: VARCHAR2(15 CHAR)
ACQ_TYPE: VARCHAR2(20 CHAR)
ACQUIRED_DT: DATE
ORG_TYPE: VARCHAR2(30 CHAR)
CAMP_BILL_AUTH: VARCHAR2(30 CHAR)
CAMP_START_DT: DATE
CAMP_END_DT: DATE
CREATED_DT: DATE
HAVEN_START_DT: DATE
HAVEN_END_DT: DATE
LW_FLG: CHAR(1 CHAR)
OFFICE_BEARER_FLG: CHAR(1 CHAR)
GREEN_STATUS: VARCHAR2(30 CHAR)
GREEN_START_DT: DATE
GREEN_END_DT: DATE
AMBER_STATUS: VARCHAR2(30 CHAR)
AMBER_START_DT: DATE
AMBER_END_DT: DATE
RED_STATUS: VARCHAR2(30 CHAR)
RED_START_DT: DATE
RED_END_DT: DATE
HAVEN_STATUS: VARCHAR2(30 CHAR)
BIRTHDAY_STATUS: VARCHAR2(30 CHAR)
BIRTHDAY_START_DT: DATE
BIRTHDAY_END_DT: DATE
CHRISTMAS_STATUS: VARCHAR2(30 CHAR)
CHRISTMAS_START_DT: DATE
CHRISTMAS_END_DT: DATE
RATE_ALERT_STATUS: VARCHAR2(30 CHAR)
RATE_ALERT_START_DT: DATE
RATE_ALERT_END_DT: DATE
GREEN_TYPE: VARCHAR2(15 CHAR)
AMBER_TYPE: VARCHAR2(15 CHAR)
PROGRAM_TYPE: VARCHAR2(30 CHAR)
BRM_EMP_ID: VARCHAR2(15 CHAR)
BRM_POSTN_ID: VARCHAR2(15 CHAR)
BRM_FULL_NAME: VARCHAR2(100 CHAR)
BRM_POSTN: VARCHAR2(50 CHAR)
LIFE_INS_STATUS: VARCHAR2(30 CHAR)
LIFE_INS_START_DT: DATE
LIFE_INS_END_DT: DATE
LOAN_TRACK_STATUS: VARCHAR2(30 CHAR)
LOAN_TRACK_START_DT: DATE
LOAN_TRACK_END_DT: DATE
WELCOME_STATUS: VARCHAR2(30 CHAR)
WELCOME_START_DT: DATE
WELCOME_END_DT: DATE
PROCURE_STATUS: VARCHAR2(30 CHAR)
PROCURE_START_DT: DATE
PROCURE_END_DT: DATE
PROSPECT_STATUS: VARCHAR2(30 CHAR)
PROSPECT_START_DT: DATE
PROSPECT_END_DT: DATE
REVIEW_STATUS: VARCHAR2(30 CHAR)
REVIEW_START_DT: DATE
REVIEW_END_DT: DATE
ANNIVERSARY_STATUS: VARCHAR2(30 CHAR)
ANNIVERSARY_START_DT: DATE
ANNIVERSARY_END_DT: DATE
SETTLEMENT_STATUS: VARCHAR2(30 CHAR)
SETTLEMENT_START_DT: DATE
SETTLEMENT_END_DT: DATE
ALLIANZ_STATUS: VARCHAR2(30 CHAR)
ALLIANZ_START_DT: DATE
ALLIANZ_END_DT: DATE
DEPR_STATUS: VARCHAR2(30 CHAR)
DEPR_START_DT: DATE
DEPR_END_DT: DATE
CAR_LOAN_STATUS: VARCHAR2(30 CHAR)
CAR_LOAN_START_DT: DATE
CAR_LOAN_END_DT: DATE
VEDA_STATUS: VARCHAR2(30 CHAR)
VEDA_START_DT: DATE
EMAIL_ADDR: VARCHAR2(350 CHAR)
MKTG_BILL_OPTION: VARCHAR2(30 CHAR)
BUSINESS_STATUS: VARCHAR2(30 CHAR)
BUSINESS_START_DT: DATE
BUSINESS_END_DT: DATE
RM_POSTN_ID: VARCHAR2(15 CHAR)
RM_POSTN: VARCHAR2(50 CHAR)
RM_EMP_ID: VARCHAR2(15 CHAR)
RM_FULL_NAME: VARCHAR2(100 CHAR)
CBDM_POSTN_ID: VARCHAR2(15 CHAR)
CBDM_POSTN: VARCHAR2(50 CHAR)
CBDM_EMP_ID: VARCHAR2(15 CHAR)
CBDM_FULL_NAME: VARCHAR2(100 CHAR)
NATIONAL_BDM_FLG: CHAR(1 CHAR)
CLIENTGOLIVE:
+full_refresh: true
# Override column types
+column_types:
CLIENT_ID: VARCHAR(800)
CLIENT: VARCHAR(800)
GOLIVE: DATE
GOLIVE_DK: NUMBER(10,0)
WC_ORG_LKP_CATEGORY:
+full_refresh: true
# Override column types
+column_types:
SALES_TEAM: VARCHAR(800)
CATEGORY: VARCHAR(800)
THRESHOLD_MIN: NUMBER(22,7)
THRESHOLD_MAX: NUMBER(22,7)
CATEGORY_DEFINITION: VARCHAR(800)
LINE_OF_BUSINESS: VARCHAR(800)
THIRD_PARTY_PERMISSIONS:
+full_refresh: true
# Override column types
+column_types:
ACCOUNT_NAME: VARCHAR(100)
BROKER_ID: VARCHAR(100)
ORG_ID: VARCHAR(100)
THIRD_PARTY_READER_ACCOUNTS:
+full_refresh: true
# Override column types
+column_types:
ACCOUNT_NAME: VARCHAR(100)
ACCOUNT_ID: VARCHAR(100)# Name your project! Project names should contain only lowercase characters and underscores. A good package name should reflect your organization's name or the intended use of these models
name: 'onedb_modern_analytics'
version: '1.0.0'
config-version: 2
# This setting configures which "profile" dbt uses for this project.
profile: 'snowflake-onedb'
# These configurations specify where dbt should look for different types of files.
# The `model-paths` config, for example, states that models in this project can be
# found in the "models/" directory. You probably won't need to change these!
model-paths: ["models"]
analysis-paths: ["analysis"]
test-paths: ["tests"]
seed-paths: ["data","seeds"]
macro-paths: ["macros"]
snapshot-paths: ["snapshots"]
target-path: "target" # directory which will store compiled SQL files
clean-targets: # directories to be removed by `dbt clean`
- "target"
- "dbt_modules"
vars:
last_run: "{{ batch_last_run_date() }}"
batch_name: master_batch
etl_proc_wid: "{{ etl_proc_wid() }}"
# Below on-run-end hook is for updating the status of the batch if any of the jobs fails.
on-run-start: "{{ project_setup() }}"
on-run-end: "{{ batch_results_update(results) }}"
# Configuring models
# In this config, we tell dbt to build all models in the onedb_modern_analytics directory
# as tables. These settings can be overridden in the individual model files
models:
onedb_modern_analytics:
# Applies to all files under models/
+persist_docs :
relation: true
columns: true
+copy_grants: true
# Applies to all files under models/datamarts/
datamarts:
materialized: table
transient: false
query_tag: dbt datamart query
analytics:
schema: EDM_AI
finance:
schema: EDM_AI
marketing:
schema: EDM_AI
sales:
schema: EDM_AI
external:
schema: EDM_EXTERNAL
external_org:
schema: EDM_EXTERNAL_ORG
# Applies to all files under models/staging/
staging:
# Prehook to logging the model execution in the Platform logging table.
+pre-hook: "{{job_logging_insert_update('In Progress')}}"
+post-hook: "{{job_logging_insert_update('Completed')}}"
schema: EDW_TRANSIENT
materialized: table
transient: false
query_tag: dbt staging query
position_dimension:
materialized: table
config:
schema: EDW_CONFIG
materialized: table
transient: false
query_tag: dbt config query
example:
schema: EDW_MODELED
materialized: table
transient: false
query_tag: dbt datawarehouse query
# Curated Layer
curated:
Flex:
schema: CURATED_FLEX
materialized: view
transient: false
query_tag: dbt curated layer
Hubspot:
schema: CURATED_HUBSPOT
materialized: view
transient: false
query_tag: dbt curated layer
Loanworks:
schema: CURATED_LOANWORKS
materialized: view
transient: false
query_tag: dbt curated layer
# Warehouse Layer
warehouse:
# Prehook to logging the model execution in the Platform logging table.
+pre-hook: "{{job_logging_insert_update('In Progress')}}"
+post-hook: "{{job_logging_insert_update('Completed')}}"
onedbHL:
schema: WH_onedbHL
materialized: table
transient: false
query_tag: dbt warehouse layer
analytics:
schema: WH_ANALYTICS
materialized: table
transient: false
query_tag: dbt warehouse layer
lookups:
schema: EDW_TRANSIENT
materialized: table
transient: true
nextgen:
schema: WH_NEXTGEN
materialized: table
transient: false
query_tag: dbt warehouse layer
securities:
schema: WH_SECURITIES
materialized: table
transient: false
query_tag: dbt warehouse layer
# Serving Layer
serving:
onedbHL:
schema: onedbHL
materialized: view
transient: false
query_tag: dbt serving layer
Analytics:
schema: ANALYTICS
materialized: view
transient: false
query_tag: dbt serving layer
Legacy_Staff:
schema: LEGACY_STAFF
materialized: view
transient: false
query_tag: dbt serving layer
Legacy_Members:
schema: LEGACY_MEMBERS
materialized: view
transient: false
query_tag: dbt serving layer
Nextgen:
schema: NEXTGEN
materialized: view
transient: false
query_tag: dbt serving layer
Securities:
schema: SECURITIES
materialized: view
transient: false
query_tag: dbt serving layer
# Below configurations are
snapshots:
onedb_modern_analytics:
staging:
+target_schema: RAW_CRM
datawarehouse:
seeds:
onedb_modern_analytics:
+schema: EDW_TRANSIENT
+quote_columns: false
# This configures NON_FLEX_PRODUCT_DATA.csv
NON_FLEX_PRODUCT_DATA:
+full_refresh: true
# Override column types
+column_types:
EFF_END_DT: VARCHAR(600)
EFF_START_DT: VARCHAR(600)
PROD_LN_WID: VARCHAR(768)
LAST_UPD: TIMESTAMP_NTZ(9)
ABN_REQ: VARCHAR(600)
ALOC_ASSETS_FLG: VARCHAR(600)
ACT: VARCHAR(600)
AOLM_NAME: VARCHAR(600)
AUTO_APP_CC: VARCHAR(600)
CREDIT_IMPAIRED_FLG: VARCHAR(600)
DESC_TEXT: VARCHAR(6144)
DETAIL_TYPE_CD: VARCHAR(600)
DFRD_EST_FEE: VARCHAR(600)
DISP_CMPNT_FLG: VARCHAR(600)
DISP_CMPNT_PRI_FLG: VARCHAR(600)
EQUITY_FLG: VARCHAR(600)
FEATURE_BPAY: VARCHAR(600)
FEATURE_BRIDGING: VARCHAR(600)
FEATURE_CONSTRUCTION: VARCHAR(600)
FEATURE_DEBIT_CARD: VARCHAR(600)
FEATURE_DIR_CREDIT: VARCHAR(600)
FEATURE_DIR_DEBIT: VARCHAR(600)
FEATURE_EARLY_REPAY: VARCHAR(600)
FEATURE_EFTPOS: VARCHAR(600)
FEATURE_INTEREST_CAP: VARCHAR(600)
FEATURE_LMI: VARCHAR(600)
FEATURE_LMI_CAPITALISE: VARCHAR(600)
FEATURE_LOC: VARCHAR(600)
FEATURE_NET_BANKING: VARCHAR(600)
FEATURE_PHONE_TRF: VARCHAR(600)
FEATURE_PORTABLE: VARCHAR(600)
FEATURE_POST: VARCHAR(600)
FEATURE_RATE_LOCK: VARCHAR(600)
FEATURE_REPAY_EXTRA: VARCHAR(600)
FEATURE_REPAY_FNT: VARCHAR(600)
FEATURE_REPAY_MTH: VARCHAR(600)
FEATURE_REPAY_WK: VARCHAR(600)
FEATURE_SALARY_DIR: VARCHAR(600)
FEATURE_SPLIT: VARCHAR(600)
FEATURE_TRN_ACC: VARCHAR(600)
FEE_DETAIL: VARCHAR(8000)
FULL_DOC_FLG: VARCHAR(600)
INT_IN_ADVANCE_FLG: VARCHAR(600)
INTEGRATION_ID: VARCHAR(600)
INV_FLG: VARCHAR(600)
NO_DOC_FLG: VARCHAR(600)
NSW: VARCHAR(600)
NT: VARCHAR(600)
OFFSET: VARCHAR(600)
ONGOING_CYCLE: VARCHAR(4500)
OO_FLG: VARCHAR(600)
PART_NUM: VARCHAR(600)
PAYG_LOW_DOC_REQ: VARCHAR(600)
PISCES_NAME: VARCHAR(600)
PROD_NAME: VARCHAR(600)
PRODUCT_CLASS: VARCHAR(600)
PROF: VARCHAR(600)
QLD: VARCHAR(600)
RATE_DETAILS: VARCHAR(600)
REDRAW: VARCHAR(600)
REPAY_OPTION: VARCHAR(600)
RESERVABLE_FLG: VARCHAR(600)
REVERSE_MORTGAGE_FLG: VARCHAR(600)
SA: VARCHAR(600)
SKIP_FLG: VARCHAR(600)
TAS: VARCHAR(600)
VENDOR_NAME: VARCHAR(600)
VENDR_PART_NUM: VARCHAR(600)
VIC: VARCHAR(600)
VISIBLE_FLG: VARCHAR(600)
WA: VARCHAR(600)
NON_FLEX_CRM_PERSON:
+full_refresh: true
# Override column types
+column_types:
ETL_PROC_WID: NUMBER(38,0)
ROW_WID: NUMBER(38,0)
INTEGRATION_ID: VARCHAR(800)
DATASOURCE_NUM_ID: NUMBER(10,0)
CREATED: TIMESTAMP_NTZ(9)
TITLE: VARCHAR(800)
FST_NAME: VARCHAR(800)
LAST_NAME: VARCHAR(800)
MID_NAME: VARCHAR(800)
BIRTH_DT: TIMESTAMP_NTZ(9)
EMAIL_ADDR: VARCHAR(800)
ALT_EMAIL_ADDR: VARCHAR(800)
FULL_NAME: VARCHAR(800)
JOB_TITLE: VARCHAR(800)
MARITAL_STAT_CD: VARCHAR(800)
PREF_COMM_MEDIA: VARCHAR(800)
SEX_MF: VARCHAR(800)
ST_ADDRESS: VARCHAR(800)
CITY: VARCHAR(800)
STATE: VARCHAR(800)
ZIPCODE: VARCHAR(800)
COUNTRY: VARCHAR(800)
WORK_PH_NUM: VARCHAR(800)
FAX_PH_NUM: VARCHAR(800)
SUPPRESS_EMAIL_FLG: VARCHAR(50)
SUPPRESS_FAX_FLG: VARCHAR(50)
SUPPRESS_CALL_FLG: VARCHAR(50)
SUPPRESS_MAIL_FLG: VARCHAR(50)
HOUSEHOLD_CONTACT_FLG: VARCHAR(50)
BEST_CALL_TIME: VARCHAR(800)
CELL_PH_NUM: VARCHAR(800)
ALIAS_NAME: VARCHAR(800)
SPOUSE_ID: VARCHAR(800)
SPOUSE_FST_NAME: VARCHAR(800)
SPOUSE_MID_NAME: VARCHAR(800)
SPOUSE_LAST_NAME: VARCHAR(800)
REL_TYPE_CD: VARCHAR(800)
CONSUMER_FLG: VARCHAR(4)
TAM_CONTACT_DT: TIMESTAMP_NTZ(9)
TAM_CONTACT_STATUS: VARCHAR(4)
OCCUPATION: VARCHAR(800)
SELF_EMPLOYED_FLG: VARCHAR(50)
PR_POSTN_ID: VARCHAR(800)
HOME_PH_NUM: VARCHAR(800)
EMP_FLG: VARCHAR(4)
HAVEN_TYPE: VARCHAR(800)
DO_NOT_CONTACT: VARCHAR(800)
UNSUB_GREEN: VARCHAR(1)
UNSUB_AMBER: VARCHAR(1)
UNSUB_HAVEN: VARCHAR(1)
UNSUB_BIRTHDAY: VARCHAR(1)
UNSUB_CHRISTMAS: VARCHAR(1)
UNSUB_RATE_ALERT: VARCHAR(1)
RATE_ALERT_ST_DT: DATE
PR_PER_ADDR_ID: VARCHAR(800)
STATUS_CD: VARCHAR(120)
MKTG_COMMERCIAL_FLG: VARCHAR(50)
EMAIL_STATUS: VARCHAR(800)
X_onedb_DO_NOT_CROSS_SELL_FLG_2: VARCHAR(50)
NUM_DEPENDENTS: VARCHAR(50)
BROKER_DO_NOT_CONTACT_FLG: VARCHAR(50)
UNSUB_SMART: VARCHAR(50)
GREEN_RCNT_MKT_DT: DATE
LOAN_TRACK_RCNT_MKT_DT: DATE
WELCOME_SENT_DT: DATE
SMART_RCNT_MKT_DT: DATE
CAR_LOAN_SENT_DT: DATE
MKTG_VALID_EMAIL: VARCHAR(1)
MKTG_VALID_NAME: VARCHAR(1)
MKTG_VALID_ADDR: VARCHAR(1)
DELETED: VARCHAR(50)
DO_NOT_OFFER_CAR_LOAN: VARCHAR(1)
FLEX_LOB:
+full_refresh: true
# Override column types
+column_types:
ROW_WID: NUMBER(10,0)
DATASOURCE_NUM_ID: NUMBER(10,0)
INTEGRATION_ID: VARCHAR(800)
LOB: VARCHAR(800)
NON_FLEX_WC_POSITION:
+full_refresh: true
# Override column types
+column_types:
DATASOURCE_NUM_ID: NUMBER(10,0)
ETL_PROC_WID: NUMBER(10,0)
INTEGRATION_ID: VARCHAR2(30 CHAR)
ROW_WID: NUMBER(10,0)
TYPE_FLG: CHAR(1 CHAR)
DIVN_NAME: VARCHAR2(100 CHAR)
EMP_FST_NAME: VARCHAR2(50 CHAR)
EMP_ID: VARCHAR2(15 CHAR)
EMP_LAST_NAME: VARCHAR2(50 CHAR)
EMP_LOGIN: VARCHAR2(50 CHAR)
EMP_MID_NAME: VARCHAR2(50 CHAR)
PAR_INTEGRATION_ID: VARCHAR2(30 CHAR)
POSITION_NAME: VARCHAR2(50 CHAR)
POSTN_TYPE_CD: VARCHAR2(30 CHAR)
VIS_BU_ID: VARCHAR2(15 CHAR)
VIS_POS_ID: VARCHAR2(15 CHAR)
VIS_PR_EMP_ID: VARCHAR2(15 CHAR)
DESC_TEXT: VARCHAR2(50 CHAR)
COST_CENTER: VARCHAR2(5 CHAR)
ORG_NAME: VARCHAR2(100 CHAR)
ORG_ADDR: VARCHAR2(200 CHAR)
OU_ID: VARCHAR2(15 CHAR)
ACQ_TYPE: VARCHAR2(20 CHAR)
ACQUIRED_DT: DATE
ORG_TYPE: VARCHAR2(30 CHAR)
CAMP_BILL_AUTH: VARCHAR2(30 CHAR)
CAMP_START_DT: DATE
CAMP_END_DT: DATE
CREATED_DT: DATE
HAVEN_START_DT: DATE
HAVEN_END_DT: DATE
LW_FLG: CHAR(1 CHAR)
OFFICE_BEARER_FLG: CHAR(1 CHAR)
GREEN_STATUS: VARCHAR2(30 CHAR)
GREEN_START_DT: DATE
GREEN_END_DT: DATE
AMBER_STATUS: VARCHAR2(30 CHAR)
AMBER_START_DT: DATE
AMBER_END_DT: DATE
RED_STATUS: VARCHAR2(30 CHAR)
RED_START_DT: DATE
RED_END_DT: DATE
HAVEN_STATUS: VARCHAR2(30 CHAR)
BIRTHDAY_STATUS: VARCHAR2(30 CHAR)
BIRTHDAY_START_DT: DATE
BIRTHDAY_END_DT: DATE
CHRISTMAS_STATUS: VARCHAR2(30 CHAR)
CHRISTMAS_START_DT: DATE
CHRISTMAS_END_DT: DATE
RATE_ALERT_STATUS: VARCHAR2(30 CHAR)
RATE_ALERT_START_DT: DATE
RATE_ALERT_END_DT: DATE
GREEN_TYPE: VARCHAR2(15 CHAR)
AMBER_TYPE: VARCHAR2(15 CHAR)
PROGRAM_TYPE: VARCHAR2(30 CHAR)
BRM_EMP_ID: VARCHAR2(15 CHAR)
BRM_POSTN_ID: VARCHAR2(15 CHAR)
BRM_FULL_NAME: VARCHAR2(100 CHAR)
BRM_POSTN: VARCHAR2(50 CHAR)
LIFE_INS_STATUS: VARCHAR2(30 CHAR)
LIFE_INS_START_DT: DATE
LIFE_INS_END_DT: DATE
LOAN_TRACK_STATUS: VARCHAR2(30 CHAR)
LOAN_TRACK_START_DT: DATE
LOAN_TRACK_END_DT: DATE
WELCOME_STATUS: VARCHAR2(30 CHAR)
WELCOME_START_DT: DATE
WELCOME_END_DT: DATE
PROCURE_STATUS: VARCHAR2(30 CHAR)
PROCURE_START_DT: DATE
PROCURE_END_DT: DATE
PROSPECT_STATUS: VARCHAR2(30 CHAR)
PROSPECT_START_DT: DATE
PROSPECT_END_DT: DATE
REVIEW_STATUS: VARCHAR2(30 CHAR)
REVIEW_START_DT: DATE
REVIEW_END_DT: DATE
ANNIVERSARY_STATUS: VARCHAR2(30 CHAR)
ANNIVERSARY_START_DT: DATE
ANNIVERSARY_END_DT: DATE
SETTLEMENT_STATUS: VARCHAR2(30 CHAR)
SETTLEMENT_START_DT: DATE
SETTLEMENT_END_DT: DATE
ALLIANZ_STATUS: VARCHAR2(30 CHAR)
ALLIANZ_START_DT: DATE
ALLIANZ_END_DT: DATE
DEPR_STATUS: VARCHAR2(30 CHAR)
DEPR_START_DT: DATE
DEPR_END_DT: DATE
CAR_LOAN_STATUS: VARCHAR2(30 CHAR)
CAR_LOAN_START_DT: DATE
CAR_LOAN_END_DT: DATE
VEDA_STATUS: VARCHAR2(30 CHAR)
VEDA_START_DT: DATE
EMAIL_ADDR: VARCHAR2(350 CHAR)
MKTG_BILL_OPTION: VARCHAR2(30 CHAR)
BUSINESS_STATUS: VARCHAR2(30 CHAR)
BUSINESS_START_DT: DATE
BUSINESS_END_DT: DATE
RM_POSTN_ID: VARCHAR2(15 CHAR)
RM_POSTN: VARCHAR2(50 CHAR)
RM_EMP_ID: VARCHAR2(15 CHAR)
RM_FULL_NAME: VARCHAR2(100 CHAR)
CBDM_POSTN_ID: VARCHAR2(15 CHAR)
CBDM_POSTN: VARCHAR2(50 CHAR)
CBDM_EMP_ID: VARCHAR2(15 CHAR)
CBDM_FULL_NAME: VARCHAR2(100 CHAR)
NATIONAL_BDM_FLG: CHAR(1 CHAR)
CLIENTGOLIVE:
+full_refresh: true
# Override column types
+column_types:
CLIENT_ID: VARCHAR(800)
CLIENT: VARCHAR(800)
GOLIVE: DATE
GOLIVE_DK: NUMBER(10,0)
WC_ORG_LKP_CATEGORY:
+full_refresh: true
# Override column types
+column_types:
SALES_TEAM: VARCHAR(800)
CATEGORY: VARCHAR(800)
THRESHOLD_MIN: NUMBER(22,7)
THRESHOLD_MAX: NUMBER(22,7)
CATEGORY_DEFINITION: VARCHAR(800)
LINE_OF_BUSINESS: VARCHAR(800)
THIRD_PARTY_PERMISSIONS:
+full_refresh: true
# Override column types
+column_types:
ACCOUNT_NAME: VARCHAR(100)
BROKER_ID: VARCHAR(100)
ORG_ID: VARCHAR(100)
THIRD_PARTY_READER_ACCOUNTS:
+full_refresh: true
# Override column types
+column_types:
ACCOUNT_NAME: VARCHAR(100)
ACCOUNT_ID: VARCHAR(100)