A request made with the Conversation Web Service can include statements in EQL.
The Conversation Service's LQLConfig type lets you make queries using EQL statements.
RETURN SalesTransactions 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/2/0" xmlns:typ="http://www.endeca.com/MDEX/lql_parser/types"> <soapenv:Header/> <soapenv:Body> <ns:Request> <ns:Language>en</ns:Language> <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 element must be a valid EQL statement.
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="SalesTransactions"> <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>
If a language ID is not specified, then en (English) is the default.
The LQLQueryString example above shows where in the request you would specify the Language element for EQL parsing error messages.