I am building ABTs with SAS Credit Scoring. The structure of my project is the following:
- Subject of Analysis: Monthly Customers table
- Variables: Monthly Customers table (come from external datasets). Not every customer is present in every month, they could not have info.
- Default: Monthly Customers table
I need to build an ABT that starts and ends with the same number of records, but our final ABT ends up having 30% of the expected records. I see in the logs that Credit Scoring is doing INNER JOIN (see code below) when building the ABT, and since not every client are in all tables, we lose records. Is there a way to change to a LEFT JOIN operator in the ABT building process?
/* Creating mapping table containing population satisfying the specified subset criteria */
proc sql noprint &sql_option.;
create table &LIB_SCR..m_&VAR_TARGET_TABLE_SK._l4_1_&RUN_NO._rk as
select TABLE1.KEY1 as KEY1, TABLE1.KEY2 as KEY2
from FMART.TABLE1 t1
inner join &LIB_SCR..m_&VAR_TARGET_TABLE_SK._l1_1_&RUN_NO. t2 on (TABLE1.KEY1 = t2.KEY1)
where (&DABT_LOAD_USER_INPUT_DTTM >= TABLE1.VALID_START_DTTM and &DABT_LOAD_USER_INPUT_DTTM <= TABLE1.VALID_END_DTTM )
;
quit;
%dabt_err_chk(type=SQL);
Thank you again.
Javier