2 Replies Latest reply: Jul 16, 2018 3:29 AM by Harry Wu RSS

    LOAD script : INLINE[data] with columns of random numbers ?

    Harry Wu

      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 :    

      CustomerProductYield
      AAK-184.38%
      AAMTx85.29%
      BBT-1185.98%
      BBT-2186.99%
      BBX-1189.43%
      CCD5590.56%
      DDS12X90.69%
      DDL11B91.33%
      DDK33A94.63%
      EEM98.19%
      EEP1s98.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);