我想使用附加条件来更新事件表(RDBMS),即其中的一列不为空。表名是MSISDNProfileDB,它在oracle数据库中。使用wso2 CEP处理空值
from incomingStream#window.length(1)
select correlation_MSISDN as MSISDN,
INTERACTION_DT as INTERACTION_DT
update MSISDNProfileDB
on MSISDNProfileDB.MSISDN == MSISDN
and not(MSISDNProfileDB.column1 is null);
它验证代码,但不更新INTERACTION_DT。出于测试目的,我将其更改为检查列是否为空,并手动从column1中删除数据。
from incomingStream#window.length(1)
select correlation_MSISDN as MSISDN,
INTERACTION_DT as INTERACTION_DT
update MSISDNProfileDB
on MSISDNProfileDB.MSISDN == MSISDN
and MSISDNProfileDB.column1 is null;
...它仍然无法正常工作。但是,当我将列值更改为1并执行此操作时:
from incomingStream#window.length(1)
select correlation_MSISDN as MSISDN,
INTERACTION_DT as INTERACTION_DT
update MSISDNProfileDB
on MSISDNProfileDB.MSISDN == MSISDN
and MSISDNProfileDB.column1 == '1';
它的工作原理!所以,结论是cep与oracle db的空值有问题。有谁知道如何处理空值?
亲切的问候, 斯特凡
嗨,你得到类似'org.wso2.siddhi.core.exception.ExecutionPlanRuntimeException任何异常:错误同时更新数据库事件,您的SQL语法错误; ... ',当你发送一个事件? – Grainier
嗨Granier,当我尝试使用此行更新...和MSISDNProfileDB.column1为空...在碳日志中有错误:“由...引起:java.sql.SQLSyntaxErrorException:ORA-00936:缺少表达式” – StStojanovic