Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Orders:
load
CustomerID,
EmployeeID ,
Freight,
Date(Date#(OrderDate,'M/DD/YYYY'),'M/DD/YYYY') AS OrderDate,
Year(OrderDate) As Year,
Month(OrderDate) ,
Day(OrderDate) ,
ApplyMap('Quarters_map',Num(Month(OrderDate),Null())) As Quarter,
// Date(Monthstart(OrderDate),'MMMYYYY') As MonthYear,
OrderID,
OrderID As OrderIDCounter,
ShipperID,
ApplyMap('Shippers_map',ShipperID,'MISSING') As Shipper
//if(CustomerID=peek('CustomerID'),peek('OrderDate'),OrderDate) As LastOrderDate
resident orders
order by OrderDate ASC;
What's the problem with your statement?
What output do you get from that load statement and what is your expected output?
What's the problem with your statement?
What output do you get from that load statement and what is your expected output?
Hello Sourabhsharma
I guess this statement can not recognize the OrderDate's data type as Date.
How about you use below statement?
---------------------
Orders_Temp:
load
CustomerID,
EmployeeID ,
Freight,
Date(Date#(OrderDate,'M/DD/YYYY'),'M/DD/YYYY') AS OrderDate,
Year(OrderDate) As Year,
Month(OrderDate) ,
Day(OrderDate) ,
ApplyMap('Quarters_map',Num(Month(OrderDate),Null())) As Quarter,
// Date(Monthstart(OrderDate),'MMMYYYY') As MonthYear,
OrderID,
OrderID As OrderIDCounter,
ShipperID,
ApplyMap('Shippers_map',ShipperID,'MISSING') As Shipper
//if(CustomerID=peek('CustomerID'),peek('OrderDate'),OrderDate) As LastOrderDate
resident Sourcetable;
Order:
load
CustomerID,
EmployeeID ,
Freight,
OrderDate,
Year,
Month,
Day,
Quarter,
OrderID,
OrderIDCounter,
ShipperID,
Shipper
resident Orders_Temp
order by OrderDate ASC;
drop table Orders_Temp;
----------------------------
Best Regard
Hanna.choi
Is that’s the same thing Amazon does? I just searched something there too. Regular results gave me 5,097 results. Sort from low to high, and it’s now 88 results. I’m starting to feel like I’m missing some giant blinking sign.