Ben yeniyim yeniyim, tbl_config dosyasında saklanan verileri almak istiyorum.esper nasıl oluşturulur tablo verileri epl tarafından oluşturuldu
config.epl
module rms.config;
create table tbl_config(
id java.math.BigDecimal primary key,
time java.math.BigDecimal
);
create schema ConfigListEvent as (
id java.math.BigDecimal,
time java.math.BigDecimal
);
@Audit
@Name("LoadConfigDataFromDBRule")
insert into ConfigListEvent
select tbl.ID as id, tbl.time as time
from ImportDataEvent,
sql: rms ['select * from T_CONFIG'] as tbl;
@Audit
@Priority(1)
@Name("DeleteConfigDataRule")
on ConfigListEvent as evt
delete from tbl_config as tbl where evt.id = tbl.id;
@Audit
@Name("InsertConfigDataRule")
on ConfigListEvent
insert into tbl_config select *;
stat.epl
module rms.stat;
uses rms.config;
@Name("Create-PaymentContext")
create window PaymentWindow.win:time(2 hour) as PaymentRequest;
@Audit
@Name("insertPaymentRequest ")
@Priority(1)
insert into PaymentWindow select * from PaymentRequest;
rule.epl
sonramodule rms.rule;
uses rms.config;
uses rms.stat;
@Audit
@Name("xxx")
@Description("check max times per IntervalTime")
on PaymentRequest as pay
select CustomUtil.getEndTime(pay.createTime,tbl_config["time"]) as startTime from PaymentWindow as payWindow;
sistem fırlatma hataları ile:
İşte bazı esper yapılandırma dosyası vardırcom.espertech.esper.epl.expression.core.ExprValidationException: Failed to validate method-chain parameter expression 'tbl_config["time"]': Incompatible type returned by a key expression for use with table 'tbl_config', the key expression '"time"' returns 'java.lang.String' but the table expects 'java.math.BigDecimal'
Birkaç gün için beni şaşırttı, Herhangi bir yardım için teşekkürler!