ADS +KXEN Models Updation
Vendor : KXEN
Version Date Comment Authors
1.0 May 11, 2009 First Version Fatima Khalid (Mobilink-BI)
Steps to Pre-ADS Running:
Check the space in DP_ADS (click on D_Production in child space).
Match CurrentPerm and MaximumPerm to see if there is difference in them or not. There
should be at least 100GB of space available so the difference between the two should be at least
1-----. Next, check if the data is loaded in the aggregates (this data is loaded from the base and
there are scripts that come from DW that run on daily basis – run from Agg_Load to see date
wise if the data was loaded till the reference date or even after to see pattern. If so, then
continue further). Two emails about this: a) Cut-off where in base tables the data is loaded on
daily basis. B) Load jobs – where some jobs remaining or completed in email. Check email data
with the reference date. Look at Mediation source system in the cut off email daily to see how
much data was loaded. For more than ref date its usually 16 hours meaning not all data loaded.
Aggregate check for SQL (month wise for 3 months - CHECKQUERY). That is, if you have to give
dump on 5th
Oct then you should on the 2nd
have the call hist/ aggregate call hist, mediated call
hist and aggregate mediated call hist for 90 days. If 2nd
on weekend then do on 1st
come on 4th
and run on previous 5 dates so that the missing date can be reconciled.
Email AR in case data is not right.
If the data is correct, then run Bimonthly (you can run this parallel to ActiveBase because here
we are just consolidating the data together).
Weekly ->directly from daily aggregate so its not dependent on bi-monthly so you can run bi-
monthly and weekly ads parallel.
After Bi-monthly, run Churn_opt and usage_opt.
Calculate reference date
Change dates in ads
Rename the four tables in Teradata administrator
1)KX_prepaid_subs to Prepad_100920_B2C_SUBS (previous ref date) – don’t create back up of
2)KX_prepaid_churn_ads to Prepad_100920_churn
3)KX_prepaid_usage_ads see from the previous in Teradata admin the exact names.
Run active base in customer base 0.61 project and den run stats for it. After that run, the last
stats and calculate the sum which should be 1million and 20 thousand. If so then run churn ads
ADS Updation Steps
Check to see if the data from CC has arrived. This is the reference table with Campaign ID’s attached.
Open Teradata Warehouse Miner
Connect =>Appliance => Click OK. Enter Username and Password.
Go to Tools => Connection Properties => Databases and enter values as below and then press
File => Open Project =>Run 2010 PrePaid Customer base 0.61(sorted as below)
a) Open Attachments.
b) Write the iteration number and date accordingly (15th
August 2010) as below. The date
when the data is supposed to go minus 2. That is, if the data is going on 18th
then subtract 2 and we get 15th
August 2010 as the Reference Date.
Note: There are also a number of queries that are used to calculate the Reference date and
explanation is provided as below.
In warehouse minor active base => click input => literal parameters => change date => value *
Also change date in => Prepaid_100815_B2C_SUB as below:
Go to ActiveBase in project Explorer => Right click and run STAND ALONE (always!)
It would start executing result then.
Calculate the sum of the calculated stats for future reference.ONLY after this execution, run rest
of the ADS because this ADS creates the subscriber base.
Note: KXPrepaid subs is our base table.
After the result is executed => go to project explorer and right click on the ∑Active_Base_Stats
and run it.
It would take some time for the result to be executed but once it has then export result to Excel
Compare the data result from the base table to the data result from the aggregate table to see if
we got the entire data or not. If the result of both the tables is < 100 then we are good to go.
Run Production Segment => Right click on the Project Explorer and run as standalone.
Note: In case there is error at any point in running any of the ADS then go to input and literal
parameters and see where the fault is and re-run it.
After that, Run ∑Production_Segments_Stats and then export the data and compare with the
result from the Active Base. The results should come out to be the same.
Note:Active Days, Model Samples and PrePaid_Subs_TR are for training so don’t run them here
Save 2010 Prepaid Customer Base 0.61 Project by right clicking on project explorer.
Open Project AGG_ADS_Monthly_3Months_Loading and change the start and end dates of M1,
M2 and M3 in the call hist and mediated call hist as below. This is done at the time of scoring.
Populates Bimonthly table.
Then open new project 2010_CHURN_ADS_0.98_Week_Analysis_Onlyand change date and run
the project. (NOT Standalone)
Run the optimized ADS 2010_PrePaid_usage_0.8_OPTsimultaneously on other machineand
change the reference date for M1(end date) and M3 (start date) - S3. Change the start date
and the end date for each of the three categories.
You can calculate the start date and the end date manually for the three categories or use the
query as below:
DATE '2010-08-15' - 89 AS "m3_start"
,DATE '2010-08-15' - 60 AS "m3_end"
,DATE '2010-08-15' - 59 AS "m2_start"
,DATE '2010-08-15' - 30 AS "m2_end"
,DATE '2010-08-15' - 29 AS "m1_start"
,DATE '2010-08-15' - 0 AS "m1_end";
After this, run the 2010_PrePaid_Churn_ 0.98_OPTADS => go to expert options and put the
start date and the end date in the where clause for each of W1, W2, M1, M2 as below:
Go to Teradata Administrator => Open KX_Prepaid_Subs (that’s our base table) Right click and
calculate the row count. It should come out to be the same as the stats in the excel sheet.
Then run KX_Prepaid_Churn_ADS and calculate the row count which should come out to be the
same as above.
For sanity check, then run KX_Prepaid_usage_ADS and calculate row count which should be the
Another sanity check, run KX_Prepaid_usage_ADS_AVGand check row count which should be
the same as the above.
Another sanity check => from Teradata Administrator =>KX_Prepaid_Churn_ADS table =>
Browse => no value should be null
For Quality purposes, the following sanity checks are also performed on the tables:
KX_Prepaid_usage_ADS_AVG_QA and KX_Prepaid_Churn_ADS_AVG_QA. The row count should
ideally be equal to 0 but it comes out to be 1 at times and then you see, if the error is only 0.1
then it is okay.
After this, run the Scores_Promo_HistADS in Miner (This is done after giving the dump).
After changing the dates, you can run these ADS’s in parallel.
Connect KXEN remote assistant with password and username yousaf and yousaf 123.
Open Project from file
Click on Apply Model Browse.
Enter the output table and conditions. The output table name would vary according to the
segmentation category. Verify from the excel sheet the category segmentation, that is Bronze 2
etc (Value Segment Reference).
For Bronze 2, the table name is KX_PREPD_CHURN_ADS_AVG_A_Active, for rest its
Click on Advanced Apply Settings.
Click, predicted value quartile Change Quartile number to 20.
Enter output table name as Bronze2_Churn_Scorein the data section.
Change the Revenue Segment to 1and the target threshold to 4. Verify both the quantities from
the excel sheet of categorization (Value Segment Reference).
Press Next and then it will prompt regarding saving or deleting the project in which case press
Press Next and then Press Cancel.
It would prompt end of model applying. Click Next and then close session.
Repeat the above mentioned process for the rest of the categorizations like Bronze 1, Silver etc.
Note: However, make sure a separate KXEN is opened each time.
For Bronze 1 repeat the same procedure as above except with setting the table name as
Quartile number is set to 20.
Output table name is changed to Bronze1_Churn_Score.
Change Revenue Segment to 2 and target threshold to 5.
Apply and Delete same as before.
Same procedure as above for Silver and Gold 2 categorization except for the minor changes in
the table name and Revenue segment as well as target threshold as above.