Details
- 
    Type:
Bug
 - 
    Status: Closed
 - 
    Priority:
Major
 - 
    Resolution: Fixed
 - 
    Affects Version/s: unspecified
 - 
    Fix Version/s: None
 - 
    Component/s: Data Checker
 - 
    Labels:None
 - 
    Environment:
Operating System: Linux
Platform: PC 
- 
        Bugzilla Id:3613
 
Description
-----------------------------------------------------------------
Project: DataChecker
Component Used: ./generate-discrepancies.sh
Build: /var/local/builds/tsa-build-bidmgr-2010-03-09-p14-r25168
------------------------------------------------------------------
For MSN Engine, discrepancy data is not generating correctly.
Steps to reproduce:
1. Login to Tsacommon database
select * from searchEngineAccounts where distributionID = 147 and accountID =
289 and  enabled ='true' order by id DESC LIMIT 20;
Select searchEngineIdentifier =1262483 , description = Content - Brand
2. Login to staging database.
select * from  msnDailyCheckV5  where CampaignName =  'Content - Brand' order by
GregorianDate desc;
----------------------------------------------------------------------------------------------------------------------------------------------------------------+
| UserID | GregorianDate | ProductName | AccountName | CampaignName | 
Impressions | Clicks | Ctr    | AverageCpc | Spend | AveragePosition |
Conversions | ConversionRate | CostPerConversion |
----------------------------------------------------------------------------------------------------------------------------------------------------------------+
| 689 | 2010-03-04 | Legalzoom | Content - Brand | 
       1317 |      0 |      0 |          0 |     0 |            1.65 |         
 0 |              0 |                 0 | 
| 689 | 2010-03-03 | Legalzoom | Content - Brand | 
       1052 |      0 |      0 |          0 |     0 |            1.67 |         
 0 |              0 |                 0 | 
| 689 | 2010-03-02 | Legalzoom | Content - Brand | 
       1255 |      0 |      0 |          0 |     0 |            1.69 |         
 0 |              0 |                 0 | 
| 689 | 2010-03-01 | Legalzoom | Content - Brand | 
       1036 |      0 |      0 |          0 |     0 |            1.71 |         
 0 |              0 |                 0 | 
| 689 | 2010-02-28 | Legalzoom | Content - Brand | 
        516 |      0 |      0 |          0 |     0 |            1.59 |         
 0 |              0 |                 0 | 
| 689 | 2010-02-27 | Legalzoom | Content - Brand | 
        329 |      0 |      0 |          0 |     0 |             1.6 |         
 0 |              0 |                 0 | 
| 689 | 2010-02-26 | Legalzoom | Content - Brand | 
        718 |      1 | 0.1393 |       1.14 |  1.14 |            1.43 |         
 0 |              0 |                 0 | 
| 689 | 2010-02-25 | Legalzoom | Content - Brand | 
        704 |      0 |      0 |          0 |     0 |            1.66 |         
 0 |              0 |                 0 | 
| 689 | 2010-02-24 | Legalzoom | Content - Brand | 
        769 |      2 | 0.2601 |       1.38 |  2.75 |            1.69 |         
 0 |              0 |                 0 | 
| 689 | 2010-02-23 | Legalzoom | Content - Brand | 
        599 |      0 |      0 |          0 |     0 |            1.86 |         
 0 |              0 |                 0 | 
3.Update imrpession, clicks etc for '2010-03-04' and '2010-02-26'
update msnDailyCheckV5 set Impressions = '1400' where GregorianDate =
'2010-03-04' and  CampaignName  = 'Content - Brand';
update msnDailyCheckV5 set Impressions = '1400'where GregorianDate = 
'2010-02-26'  and  CampaignName  = 'Content - Brand';
Verify if it is updated...
mysql> select * from  msnDailyCheckV5  where CampaignName =  'Content - Brand'
order by GregorianDate desc;
----------------------------------------------------------------------------------------------------------------------------------------------------------------+
| UserID | GregorianDate | ProductName | AccountName | CampaignName | 
Impressions | Clicks | Ctr    | AverageCpc | Spend | AveragePosition |
Conversions | ConversionRate | CostPerConversion |
----------------------------------------------------------------------------------------------------------------------------------------------------------------+
| 689 | 2010-03-04 | Legalzoom | Content - Brand | 
       1400 |      0 |      0 |          0 |     0 |            1.65 |         
 0 |              0 |                 0 | 
| 689 | 2010-03-03 | Legalzoom | Content - Brand | 
       1052 |      0 |      0 |          0 |     0 |            1.67 |         
 0 |              0 |                 0 | 
| 689 | 2010-03-02 | Legalzoom | Content - Brand | 
       1255 |      0 |      0 |          0 |     0 |            1.69 |         
 0 |              0 |                 0 | 
| 689 | 2010-03-01 | Legalzoom | Content - Brand | 
       1036 |      0 |      0 |          0 |     0 |            1.71 |         
 0 |              0 |                 0 | 
| 689 | 2010-02-28 | Legalzoom | Content - Brand | 
        516 |      0 |      0 |          0 |     0 |            1.59 |         
 0 |              0 |                 0 | 
| 689 | 2010-02-27 | Legalzoom | Content - Brand | 
        329 |      0 |      0 |          0 |     0 |             1.6 |         
 0 |              0 |                 0 | 
| 689 | 2010-02-26 | Legalzoom | Content - Brand | 
       1400 |      1 | 0.1393 |       1.14 |  1.14 |            1.43 |         
 0 |              0 |                 0 | 
| 689 | 2010-02-25 | Legalzoom | Content - Brand | 
        704 |      0 |      0 |          0 |     0 |            1.66 |         
 0 |              0 |                 0 | 
4.Now execute the script and check the report file generated at tmp folder.
 ./generate-discrepancies.sh -d3 -account 289 -distribution 147 -T 2010-02-26 -E
2010-03-04
and check if discrepancy reports have rows for '2010-03-04' and '2010-02-26'
Find the attached csv file :
Expected : 
The generated CSV file should have data discrepancy for '2010-02-26' and
'2010-03-04'
I checked through Admax it is showing discrepancy for '2010-02-26' and '2010-03-04'