Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I want to combine three csv files into a single quantity
how to do that ?
* QVD
Load from each QVD using a loop or a wild card load. Use Concatenate if the field lists are not identical. Then store the resulting table as a new, combined QVD.
You may want an extra field to identify the source of the data.
Not clear
I want to combine three individual csv files into single Qvd. the three files which I have to combine are csv files and it does not contain any column header and even the number of columns in all three files are not the same, so is it possible to combine three files into a single QVD? and how?
Hi Saksham,
If three files are doesn't contain same Data & not same number of Columns then why do you want to combine them into single QVD ?
you have to provide us more detail and sample script or data file
Thanks,
Mukram
Orders:
LOAD
[0SOLD_TO:0SOLD_TO] as SAPCode_Order,
[0MATERIAL:0MATERIAL]&[0AF_COLOR:0AF_COLOR]&[0AF_SIZE:0AF_SIZE] as itemnumber,
left([0MATERIAL:0MATERIAL],3) as [Season Code],
[0CONF_QTY:0CONF_QTY] as quantity_order,
[Z_MRP_INR:Z_MRP_INR] as Sales_price_order,
([Z_WSP_INR:Z_WSP_INR]/[0CONF_QTY:0CONF_QTY]) as WS_price
FROM
(
(This above file was created manually by using below files D:\Data\Order\dwh_VBAK*.txt,
SAPCode_Orders:
Mapping LOAD
@2 as SAP_Trans_code,
@3 as SAPCode_Order
FROM
(
Material_Orders:
Mapping Load
@2&'N'&@3 as Material_Trans_code,
trim(@7) as Material
FROM
(
SAP_LEVEL:
LOAD @2 as SAP_Trans_code,
@2&'N'&@3 as Material_Trans_code,
@7 as Color_Size,
@12 as quantity_order,
@15/@12 as WS_Price
FROM
(
where @6='';
SAP_LEVEL_Final:
Concatenate(Orders)
Load
ApplyMap('SAPCode_Orders',SAP_Trans_code,'-') as SAPCode_Order,
ApplyMap('Material_Orders',Material_Trans_code,'-')&Color_Size as itemnumber,
Left(ApplyMap('Material_Orders',Material_Trans_code,'-'),3) as [Season Code],
applymap('MRP_temp',ApplyMap('Material_Orders',Material_Trans_code,'-')&Color_Size,'-')*quantity_order as Sales_price_order,
quantity_order,
WS_Price
Resident SAP_LEVEL;
drop table SAP_LEVEL;
Temporary:
mapping LOAD SAPCode as SAPCode_Order,
ETPCode
Resident Store_Mapping ;
Orders_temp:
load SAPCode_Order,
[Season Code],
itemnumber,
quantity_order,
Sales_price_order,
WS_price,
applymap('Temporary',SAPCode_Order,'Others') as ETPCode
resident Orders;
drop table Orders;
Orders_temp2:
left keep (Temp)
load
*
resident Orders_temp;
drop table Orders_temp;
Orders_data:
//Concatenate(POS_Master)
load
SAPCode_Order,
[Season Code],
itemnumber,
quantity_order,
Sales_price_order,
ETPCode
resident Orders_temp2;
Pos_Master_temp:
load *,
itemnumber&ETPCode as Key
resident Orders_data;
WS_Mapping:
mapping load itemnumber&ETPCode as Key,
WS_price
resident Orders_temp2;
POS_Master_final:
load *,
applymap('WS_Mapping',Key,'-') as WS_Cost
resident Pos_Master_temp;
//drop table POS_Master;
drop table Orders_data;
drop table Pos_Master_temp;
drop table Orders_temp2;