Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
When I try to reload the script I see this error popped up.
Table not found
minmaxdates:
Load
min([Opened Date]) as minDate,
max([Opened Date]) as maxDate
Resident rawdata;
Looks like I'm missing something in the master calendar script.
Can someone tell me the solution for this error here ?
----------------------------------------------------------------------Main tab script-------------------------------------------------------
rawdata:
LOAD [Case Number] as Case_ID,
[Case Subject],
[# of Accounts],
[Business Group],
[Case Owner],
[Month of Issue],
[Mailing Instruction],
[Client service],
[State Street],
[Opened Date],
[Closed Date],
[Customer Name],
[Authorized Signatory],
[Case Comments],
Description,
[Age (Hours)],
Status,
Type,
Product,
[Case Record Type],
Date(Alt(Date#([Opened Date],'MM/DD/YYYY'),Date#([Opened Date],'MM-DD-YYYY'),Date([Opened Date],'MM/DD/YYYY'))) as Opened_Date,
Date(Alt(Date#([Closed Date],'MM/DD/YYYY'),Date#([Closed Date],'MM-DD-YYYY'),Date([Opened Date],'MM/DD/YYYY'))) as Closed_Date
FROM
[\\Dbg.ads.db.com\nyc-users-u\USERS12\thirmoh\data\DB Files\August consolidated raw data.xlsx]
(ooxml, embedded labels, table is rawdata);
NoConcatenate
Case:
Load *,
if(Opened_Date=Closed_Date,1,Closed_Date-Opened_Date) as Time_Spent
Resident rawdata
where not IsNull(Case_ID);
Drop Table rawdata;
--------------------------------------------------------------------------------------Master calendar script----------------------------------------------------------
minmaxdates:
Load
min([Opened Date]) as minDate,
max([Opened Date]) as maxDate
Resident rawdata;
Let vMinDate = Num(Peek('minDate',0,'minmaxdates'));
Let vMaxDate = Num(Peek('maxDate',0,'minmaxdates'));
DROP table minmaxdates;
DateRanges:
LOAD
$(vMinDate) + IterNo()-1 as dateNum,
Date($(vMinDate) + IterNo()-1) as TempDate
AutoGenerate 1 While $(vMinDate) + IterNo()-1 <= $(vMaxDate);
MasterCalendar:
LOAD
TempDate as [Opened Date],
Day(TempDate) as Day,
Week(TempDate) as Week,
Month(TempDate) as Month,
'Q' & Ceil(Month(TempDate)/3) as Quarter,
Year(TempDate) as Year
Resident DateRanges Order by TempDate asc;
DROP Table DateRanges;
I think the reason is:
You are dropping the
Drop Table rawdata;
and then trying to access in the below code:
minmaxdates:
Load
min([Opened Date]) as minDate,
max([Opened Date]) as maxDate
Resident rawdata;
Move the below line to the end and it should be good:
Drop Table rawdata;
Hope this helps...
I think the reason is:
You are dropping the
Drop Table rawdata;
and then trying to access in the below code:
minmaxdates:
Load
min([Opened Date]) as minDate,
max([Opened Date]) as maxDate
Resident rawdata;
Move the below line to the end and it should be good:
Drop Table rawdata;
Hope this helps...
Hi Thirumala,
Thanks it worked.
Regards,
Mohith
Glad able to help. Can you please close the thread by selecting the correct answer.