Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi all ,
can anyone tell me how to generate data think that I'm not having any source files
my requirement is lik generate data ,date,sunnydays such that atleast 40% days are sunnyin the year
autogenrate function I tried and generated date but not sunny days how can I generate data
Something like this?
Table:
LOAD Date(MakeDate(2014, 12, 31) + IterNo()) as Date,
If(Rand() <= 0.40, 'Sunny Days', 'Cloudy Days') as DayTypeFlag
AutoGenerate 1
While IterNo() <= MakeDate(2015, 12, 31) - MakeDate(2014, 12, 31);
I tried ur logic not working
LOAD
//RecNo() as S.no,
Date(MakeDate(2015,12,31)+recno()) as Date,
if(Rand()<=0.8,'Y','N') as sunny days
autogenerate 365
I couldn't understand this steps below
AutoGenerate 1
While IterNo() <= MakeDate(2015, 12, 31) - MakeDate(2014, 12, 31);
So this did not work? or did it?
LOAD
//RecNo() as S.no,
Date(MakeDate(2015,12,31)+recno()) as Date,
if(Rand()<=0.8,'Y','N') as sunny days
autogenerate 365
not working
Does this not look right?
79.45% are Yes and 20.55% are No?