A request made with the Conversation Web Service can include statements in the Endeca Query Language (EQL). To make EQL requests, add EQL statements with the LQLConfig type.
RETURN statement AS SELECT SUM(FactSales_SalesAmount) WHERE (DimDate_FiscalYear=2008) AS Sales2008, SUM(FactSales_SalesAmount) WHERE (DimDate_FiscalYear=2007) AS Sales2007, ((Sales2008-Sales2007)/Sales2007 * 100) AS pctChange, countDistinct(FactSales_SalesOrderNumber) AS TransactionCount group
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.endeca.com/MDEX/conversation/1/0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:typ="http://www.endeca.com/MDEX/lql_parser/types"> <soapenv:Header/> <soapenv:Body> <ns:Request> <ns:State/> <ns:ContentElementConfig Id="LQLConfig" xsi:type="ns:LQLConfig" HandlerNamespace="http://www.endeca.com/MDEX/conversation/1/0" HandlerFunction="LQLHandler" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <ns:LQLQueryString> RETURN statement AS SELECT SUM(FactSales_SalesAmount) WHERE (DimDate_FiscalYear=2008) AS Sales2008, SUM(FactSales_SalesAmount) WHERE (DimDate_FiscalYear=2007) AS Sales2007, ((Sales2008-Sales2007)/Sales2007 * 100) AS pctChange, countDistinct(FactSales_SalesOrderNumber) AS TransactionCount group </ns:LQLQueryString> </ns:ContentElementConfig> </ns:Request> </soapenv:Body> </soapenv:Envelope>
The contents of the LQLQueryString in LQLConfig must be a valid EQL statement. For detailed information on EQL syntax, see the Oracle Endeca Server Query Language Reference.
The HandlerFunction that supports processing of the LQLConfig is LQLHandler.
<cs:ContentElement xsi:type="cs:LQL" Id="LQLConfig" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <cs:ResultRecords NumRecords="1" Name="statement"> <cs:DimensionHierarchy/> <cs:AttributeMetadata name="Sales2007" type="mdex:double"/> <cs:AttributeMetadata name="Sales2008" type="mdex:double"/> <cs:AttributeMetadata name="TransactionCount" type="mdex:long"/> <cs:AttributeMetadata name="pctChange" type="mdex:double"/> <cs:Record> <Sales2007 type="mdex:double">2.79216705182E7</Sales2007> <Sales2008 type="mdex:double">3.62404846965997E7</Sales2008> <TransactionCount type="mdex:long">3796</TransactionCount> <pctChange type="mdex:double">29.793397114178</pctChange> </cs:Record> </cs:ResultRecords> </cs:ContentElement>