Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello.
I have the following script. If i reload the script as below
LOAD ITEM_ID,
BARCODE_ID,
BARCODE,
STORE_ID,
SALES_DATE,
SALES_WEEK,
SALES_WEEKDAY,
SALES_YEAR,
SALES_MONTH,
SALES_QTY,
SALES_AMT,
CURRENT_SELPRICE,
SALES_PERC_FPA,
SALES_AMT_FPA,
PRICE_LIST,
PRICE_NET_LIST,
PRICE_HALF_NET_LIST,
PRICE_NET_NET_LIST,
COST_SALES
FROM C:\QVDS\SALES_2016_01.QVD (qvd);
LOAD ITEM,
AMOUNT_FPA_TRIG,
AR_EISAGWGIS,
MODULE,
SALES_YEAR,
SALES_MONTH,
SALES_DATE,
AMOUNT_TRIG,
QTY_TRIG,
TRANS_TYPE,
WHS_TRIG,
CUSTOMER,
AFM_CUST,
STORE_ID,
ITEM_ID
FROM C:\QVDS\FRANCHISE_SALES_2016_01.QVD (qvd);
i have the following image in the table view.
If i concatenate the two tables i avoid the synthetic keys but i have i huge delay to load the second table.
The two tables have more than 25.000.000 records for one month.
Is there any other way to avoid the synthetic keys and not have the delay of loading the second table ?
Thank you in advance.
For the Join to emulate a Concatenate one needs to ensure that the two tables share at least one identical field, and that there are no matching sets of key values. This is easily achieved by adding a new field, such as “Fact Type”, which we usually add anyway, to differentiate between the different types of Facts in the concatenated table. When the data from one Fact is marked with one Fact Type and the data from another Fact is marked with another Fact Type, then surely no matching keys will ever exist!
Italics pasted in from Q-Tip #9 – CONCATENATE or JOIN ? | Natural Synergies,,
So adding the Source field below makes it emulate a Concatenate
xx:
load * inline [
key, f1 , Fact Type
1, a , ZZ
2, b ,ZZ
];
join (xx) load * inline [
key, f3, Fact Type
1, aa , YY
2, bb , YY
];
And one ends up with this table.
f1 | f3 | key | Fact Type |
---|---|---|---|
a | 1 | ZZ | |
b | 2 | ZZ | |
aa | 1 | YY | |
bb | 2 | YY |
Ok Bill, you' re right, I forgot the Fact Type.
Thanks