Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi experts,
I am building a new dashboard, so here I need to make up the numbers for simulation. But I am new to LOAD scripts.
For the desired result, I want to insert the random numbers in the column of 'Yield'.
What should the LOAD script look like to make it happen? It's possibly to be done in one table, instead of creating two and combining them together?
What if the data source (i.e. Customer, Product) is from Excel file, what LOAD script should I put on, to fill in the random numbers in column 'Yield' ?
Any reference link or document that specializes in LOAD script? Appreciate the help!
Desired result :
Customer | Product | Yield |
A | AK-1 | 84.38% |
A | AMTx | 85.29% |
B | BT-11 | 85.98% |
B | BT-21 | 86.99% |
B | BX-11 | 89.43% |
C | CD55 | 90.56% |
D | DS12X | 90.69% |
D | DL11B | 91.33% |
D | DK33A | 94.63% |
E | EM | 98.19% |
E | EP1s | 98.55% |
Table1:
LOAD * INLINE [
Customer,Product
A,AK-1
A,AMTx
B,BT-11
B,BT-21
B,BX-11
C,CD55
D,DS12X
D,DL11B
D,DK33A
E,EM
E,EP1s
];
RandomNumber:
LOAD
Rand()*(1-0.80) + 0.80 as RandomNumber
AutoGenerate(11);
Hi Harry,
You can add calculated fields to load part of Inline script.
LOAD *
,Rand()*(1-0.80) + 0.80 as Yield
INLINE [
Customer,Product
A,AK-1
A,AMTx
B,BT-11
B,BT-21
B,BX-11
C,CD55
D,DS12X
D,DL11B
D,DK33A
E,EM
E,EP1s
];
Hope it helps.
Hi Harry,
You can add calculated fields to load part of Inline script.
LOAD *
,Rand()*(1-0.80) + 0.80 as Yield
INLINE [
Customer,Product
A,AK-1
A,AMTx
B,BT-11
B,BT-21
B,BX-11
C,CD55
D,DS12X
D,DL11B
D,DK33A
E,EM
E,EP1s
];
Hope it helps.
Thanks! Can't believe that's so easy!