Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everybody!
Does anybody tried to run IntervalMatch with plenty of data?
I have an error in running script, simulating big dataset:
SET ThousandSep=' ';
SET DecimalSep=',';
SET MoneyThousandSep=' ';
SET MoneyDecimalSep=',';
SET MoneyFormat='# ##0,00?.;-# ##0,00?.';
SET TimeFormat='h:mm:ss';
SET DateFormat='DD.MM.YYYY';
SET TimestampFormat='DD.MM.YYYY h:mm:ss[.fff]';
SET MonthNames='???;???;???;???;???;???;???;???;???;???;???;???';
SET DayNames='??;??;??;??;??;??;??';
LET DataLoadStart = now(1); // ????? ?????? Reload
LET DateNow = today();
LET DateStart = MakeDate(2008);
Products:
load RecNo() as ProductId, '?????'&text(RecNo()) as '?????'
autogenerate(1000); /* if this number 10 or 100, script runs without error */
Cwocs:
load RecNo() as CwocId, '?????'&text(RecNo()) as '?????'
autogenerate(15);
Party:
load RecNo() as PartyId, '??????'&text(RecNo()) as '??????'
autogenerate(10);
TransactionTemp:
load date('$(DateStart)' + IterNo() -1) as Date
autogenerate 1
while ('$(DateStart)'+IterNo()-1)<'$(DateNow)';
Calendar:
load Month(Date) AS '?????',
Day(Date) AS '????',
WeekDay(Date) AS '???? ??????',
Year(Date) AS '???',
'K' & Ceil(Month(Date)/3) AS '???????',
Date as '????',
Date,
MonthStart(Date) as MonthStart
resident TransactionTemp;
TransactionTemp1:
load ProductId
resident Products;
left join (TransactionTemp1)
load CwocId
resident Cwocs;
left join (TransactionTemp1)
load PartyId
resident Party;
left join (TransactionTemp1)
load
ProductId, CwocId, PartyId,
autonumberhash128(ProductId, CwocId, PartyId) as ProductIdCwocIdPartyId
resident TransactionTemp1;
left join (TransactionTemp)
load
ProductId, CwocId, PartyId,
ProductIdCwocIdPartyId
resident TransactionTemp1;
ProductPriceTemp:
load
distinct
MonthStart as Date
resident Calendar
;//group by MonthStart;
left join (ProductPriceTemp)
load
ProductIdCwocIdPartyId,
(Rand()*1000) as Price
resident TransactionTemp1
;
drop table TransactionTemp1;
//drop table TransactionTemp;
//exit script;
ProductPrice: // ?????????????? ??? ????????????? intervalmatch
load
ProductIdCwocIdPartyId,
Date as DateFrom_BP,
Date(if(ProductIdCwocIdPartyId=previous(ProductIdCwocIdPartyId),previous(Date)
- 1)) as DateTo_BP,
Price
resident ProductPriceTemp
order by ProductIdCwocIdPartyId, Date DESC;
drop table ProductPriceTemp;
left join (TransactionTemp)
intervalmatch(Date, ProductIdCwocIdPartyId) /* this is the point of error*/
load
DateFrom_BP, DateTo_BP, ProductIdCwocIdPartyId
resident ProductPrice;
Hi,
noticed same in 8-version prior to the latest 8.5-release, but since then believe it has been solved.
Which version are you running?
/Peter
Hi,
Tested in both 8.5 and 9.0 version with the same result