DMI is what i need to change. But the problem is when it reaches to DMI the criteria is : "ORIG" :"US". So i don't have any info to decide at this level whether it is a Country or a Airport because when constructing facets it was constructed as one tree facet : "ORIG" .
Announcement
Collapse
No announcement yet.
X
-
Probably the easiest way to handle this is to add a prefix to each facetValueId so you know where it came from (eg city_SFO, country_USA). You can do this via a DMI when loading the ORIG tree by calling dsRequest.execute() and then modifying the data in the DSResponse. Then when the cube sends a request, you'll know which type of ORIG is being submitted without the need to consult the database again.
Comment
-
I have issues configuring the DMI:
Code:<operationBindings> <operationBinding operationType="fetch" > <serverObject lookupStyle="new" className="com.smartgwt.sample.client.CubeGridDMI" methodName="fetch"/> <selectClause> ORIG,DEST,dates,sum(PAX_COUNT) as bookings </selectClause> <whereClause>security_id ='120' AND orig in ('BOM','DEL','CCU') and DEST IN ('MAA','AMD','COM') and dates between 200901 and 200903 and ($defaultWhereClause) </whereClause> <groupClause> ORIG,DEST,dates </groupClause> </operationBinding> </operationBindings>
Code:package com.smartgwt.sample.client; import com.isomorphic.datasource.DSRequest; import com.isomorphic.datasource.DSResponse; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; public class CubeGridDMI { public DSResponse fetch(DSRequest dsRequest) throws Exception { Map criteriaMap = dsRequest.getCriteria(); Map newCriteriaMap = new HashMap(); for (Object each : criteriaMap.keySet()) { Object value = criteriaMap.get(each); if (value.getClass().equals(List.class)) { List values = (List) value; List newValues = new ArrayList(); for (Object k : values) { if (k.toString().contains("CNTRY")) { if (k.toString().contains("ORIG")) newCriteriaMap.put("ORG_CNTRY_CD", k); else newCriteriaMap.put("DEST_CNTRY_CD", k); } else newValues.add(k); } newCriteriaMap.put(each,newValues); } else { if (value.toString().contains("CNTRY")) { if (value.toString().contains("ORIG")) newCriteriaMap.put("ORG_CNTRY_CD", value); else newCriteriaMap.put("DEST_CNTRY_CD", value); } } } dsRequest.setCriteria(newCriteriaMap); return dsRequest.execute(); } }
Code:<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 1.6.4//EN" "http://google-web-toolkit.googlecode.com/svn/tags/1.6.4/distro-source/core/src/gwt-module.dtd"> <module rename-to="builtinds"> <inherits name='com.google.gwt.user.User'/> <inherits name="com.smartgwtee.SmartGwtEE"/> <inherits name="com.smartgwt.Drawing"/> <inherits name="com.smartgwt.Analytics"/> <inherits name="com.smartgwtee.tools.Tools"/> <entry-point class='com.smartgwt.sample.client.BuiltInDS'/> </module>
But compiler shows the following while compiling but doesn't fail..
Code:[ERROR] Errors in 'file:/C:/Documents%20and%20Settings/sg0209257/My%20Documents/built-in-ds/src/com/smartgwt/sample/client/CubeGridDMI.java' [ERROR] Line 20: No source code is available for type com.isomorphic.datasource.DSResponse; did you forget to inherit a required module? [ERROR] Line 20: No source code is available for type com.isomorphic.datasource.DSRequest; did you forget to inherit a required module?
Comment
-
Code:<DataSource ID="adb" table="adb" serverType="sql" dbName="jdbc/mdads" qualifyColumnNames="false"> <fields> <field name="ORIG" type="text" required="false" length="3" title="Origin"/> <field name="DEST" type="text" required="false" length="3" title="Destination"/> <field name="dates" type="number" required="false" title="Dates"/> <field name="bookings" type="number" required="false" title="Bookings"/> </fields> <operationBindings> <operationBinding operationType="fetch" operationId="cubeGrid"> <selectClause> orig,ORG_CTY_CD,ORG_CNTRY_CD,WACO,dest, DEST_CTY_CD,DEST_CNTRY_CD,WACD,dates </selectClause> <whereClause>security_id ='120' AND orig in ('BOM','DEL','CCU') and DEST IN ('MAA','AMD','COM') and dates between 200901 and 200903 </whereClause> <groupClause> orig,ORG_CTY_CD,ORG_CNTRY_CD,WACO,dest, DEST_CTY_CD,DEST_CNTRY_CD,WACD,dates </groupClause> </operationBinding> <operationBinding operationType="fetch" > <serverObject lookupStyle="new" className="com.smartgwt.sample.client.CubeGridDMI" methodName="fetch"/> <selectClause> ORIG,DEST,dates,sum(PAX_COUNT) as bookings </selectClause> <whereClause>security_id ='120' AND orig in ('BOM','DEL','CCU') and DEST IN ('MAA','AMD','COM') and dates between 200901 and 200903 and ($defaultWhereClause) </whereClause> <groupClause> ORIG,DEST,dates </groupClause> </operationBinding> </operationBindings> <!--<operationBinding operationType="fetch"--> <!--whereClause="security_id ='120' AND orig='BOM' and dest='DEL' and dates=200901 and domairl='AI' "/>--> </DataSource>
Code:=== 2011-04-28 02:23:19,088 [main] INFO ISCInit - Isomorphic SmartClient Framework - Initializing === 2011-04-28 02:23:19,088 [main] INFO ConfigLoader - Attempting to load framework.properties from CLASSPATH === 2011-04-28 02:23:19,151 [main] INFO ConfigLoader - Successfully loaded framework.properties from CLASSPATH at location: jar:file:/C:/Documents%20and%20Settings/sg0209257/My%20Documents/built-in-ds/classes/artifacts/builtinds/WEB-INF/lib/isomorphic_core_rpc.jar!/framework.properties === 2011-04-28 02:23:19,151 [main] INFO ConfigLoader - Attempting to load project.properties from CLASSPATH === 2011-04-28 02:23:19,151 [main] INFO ConfigLoader - Unable to locate project.properties in CLASSPATH === 2011-04-28 02:23:19,166 [main] INFO ConfigLoader - Successfully loaded isc_interfaces.properties from CLASSPATH at location: jar:file:/C:/Documents%20and%20Settings/sg0209257/My%20Documents/built-in-ds/classes/artifacts/builtinds/WEB-INF/lib/isomorphic_core_rpc.jar!/isc_interfaces.properties === 2011-04-28 02:23:19,197 [main] INFO ConfigLoader - Attempting to load server.properties from CLASSPATH === 2011-04-28 02:23:19,213 [main] INFO ConfigLoader - Successfully loaded server.properties from CLASSPATH at location: file:/C:/Documents%20and%20Settings/sg0209257/My%20Documents/built-in-ds/classes/artifacts/builtinds/WEB-INF/classes/server.properties === 2011-04-28 02:23:19,213 [main] INFO Logger - Logging system started. === 2011-04-28 02:23:19,213 [main] INFO ISCInit - Isomorphic SmartClient Framework (SC_SNAPSHOT-2011-02-28/EVAL Deployment 2011-03-01) - Initialization Complete === 2011-04-28 02:23:19,213 [main] INFO ISCInit - Auto-detected webRoot - using: C:\Documents and Settings\sg0209257\My Documents\built-in-ds\classes\artifacts\builtinds === 2011-04-28 02:23:19,260 [main] INFO PreCache - Isomorphic PreCache servlet loading === 2011-04-28 02:23:19,291 [main] INFO PoolManager - SmartClient pooling disabled for 'DataSource' objects === 2011-04-28 02:23:19,354 [main] DEBUG XML - Parsed XML from C:\Documents and Settings\sg0209257\My Documents\built-in-ds\classes\artifacts\builtinds\builtinds\sc\system\schema\DataSource.ds.xml: 0ms === 2011-04-28 02:23:19,369 [main] DEBUG XML - Parsed XML from C:\Documents and Settings\sg0209257\My Documents\built-in-ds\classes\artifacts\builtinds\builtinds\sc\system\schema\builtinTypes.xml: 0ms === 2011-04-28 02:23:19,447 [main] DEBUG XML - Parsed XML from C:\Documents and Settings\sg0209257\My Documents\built-in-ds\classes\artifacts\builtinds\builtinds\sc\system\schema\DataSourceField.ds.xml: 15ms === 2011-04-28 02:23:19,463 [main] DEBUG XML - Parsed XML from C:\Documents and Settings\sg0209257\My Documents\built-in-ds\classes\artifacts\builtinds\builtinds\sc\system\schema\Validator.ds.xml: 0ms === 2011-04-28 02:23:19,479 [main] DEBUG XML - Parsed XML from C:\Documents and Settings\sg0209257\My Documents\built-in-ds\classes\artifacts\builtinds\builtinds\sc\system\schema\ValueMap.ds.xml: 0ms === 2011-04-28 02:23:19,494 [main] DEBUG XML - Parsed XML from C:\Documents and Settings\sg0209257\My Documents\built-in-ds\classes\artifacts\builtinds\builtinds\sc\system\schema\InstantDataApp.ds.xml: 15ms === 2011-04-28 02:23:19,541 [main] DEBUG XML - Parsed XML from C:\Documents and Settings\sg0209257\My Documents\built-in-ds\classes\artifacts\builtinds\builtinds\sc\system\schema\Application.ds.xml: 0ms === 2011-04-28 02:23:19,541 [main] DEBUG XML - Parsed XML from C:\Documents and Settings\sg0209257\My Documents\built-in-ds\classes\artifacts\builtinds\builtinds\sc\system\schema\IDAPage.ds.xml: 0ms === 2011-04-28 02:23:19,557 [main] DEBUG XML - Parsed XML from C:\Documents and Settings\sg0209257\My Documents\built-in-ds\classes\artifacts\builtinds\builtinds\sc\system\schema\IDAUserType.ds.xml: 0ms === 2011-04-28 02:23:19,588 [main] DEBUG XML - Parsed XML from C:\Documents and Settings\sg0209257\My Documents\built-in-ds\classes\artifacts\builtinds\builtinds\sc\system\schema\IDAOperation.ds.xml: 0ms === 2011-04-28 02:23:19,604 [main] DEBUG XML - Parsed XML from C:\Documents and Settings\sg0209257\My Documents\built-in-ds\classes\artifacts\builtinds\builtinds\sc\system\schema\Canvas.ds.xml: 0ms === 2011-04-28 02:23:19,651 [main] DEBUG XML - Parsed XML from C:\Documents and Settings\sg0209257\My Documents\built-in-ds\classes\artifacts\builtinds\builtinds\sc\system\schema\MethodDeclaration.ds.xml: 0ms === 2011-04-28 02:23:19,666 [main] DEBUG XML - Parsed XML from C:\Documents and Settings\sg0209257\My Documents\built-in-ds\classes\artifacts\builtinds\builtinds\sc\system\schema\Img.ds.xml: 0ms === 2011-04-28 02:23:19,666 [main] DEBUG XML - Parsed XML from C:\Documents and Settings\sg0209257\My Documents\built-in-ds\classes\artifacts\builtinds\builtinds\sc\system\schema\StatefulCanvas.ds.xml: 0ms === 2011-04-28 02:23:19,697 [main] DEBUG XML - Parsed XML from C:\Documents and Settings\sg0209257\My Documents\built-in-ds\classes\artifacts\builtinds\builtinds\sc\system\schema\Button.ds.xml: 0ms === 2011-04-28 02:23:19,713 [main] DEBUG XML - Parsed XML from C:\Documents and Settings\sg0209257\My Documents\built-in-ds\classes\artifacts\builtinds\builtinds\sc\system\schema\ListViewer.ds.xml: 0ms === 2011-04-28 02:23:19,729 [main] DEBUG XML - Parsed XML from C:\Documents and Settings\sg0209257\My Documents\built-in-ds\classes\artifacts\builtinds\builtinds\sc\system\schema\ListGrid.ds.xml: 16ms === 2011-04-28 02:23:19,744 [main] DEBUG XML - Parsed XML from C:\Documents and Settings\sg0209257\My Documents\built-in-ds\classes\artifacts\builtinds\builtinds\sc\system\schema\DynamicForm.ds.xml: 0ms === 2011-04-28 02:23:19,760 [main] DEBUG XML - Parsed XML from C:\Documents and Settings\sg0209257\My Documents\built-in-ds\classes\artifacts\builtinds\builtinds\sc\system\schema\FormItem.ds.xml: 0ms === 2011-04-28 02:23:19,791 [main] DEBUG XML - Parsed XML from C:\Documents and Settings\sg0209257\My Documents\built-in-ds\classes\artifacts\builtinds\builtinds\sc\system\schema\DetailViewer.ds.xml: 0ms === 2011-04-28 02:23:19,791 [main] DEBUG XML - Parsed XML from C:\Documents and Settings\sg0209257\My Documents\built-in-ds\classes\artifacts\builtinds\builtinds\sc\system\schema\DetailViewerField.ds.xml: 0ms === 2011-04-28 02:23:19,807 [main] DEBUG XML - Parsed XML from C:\Documents and Settings\sg0209257\My Documents\built-in-ds\classes\artifacts\builtinds\builtinds\sc\system\schema\isomorphicXML.ds.xml: 0ms === 2011-04-28 02:23:19,838 [main] INFO PreCache - Isomorphic PreCache complete (578ms) === 2011-04-28 02:23:22,869 [or25] INFO RequestContext - URL: '/builtinds/BuiltInDS.html', User-Agent: 'Java/1.6.0_21': Unsupported WITHOUT Accept-Encoding header === 2011-04-28 02:23:23,229 [or24] INFO RequestContext - URL: '/builtinds/builtinds/sc/DataSourceLoader', User-Agent: 'Mozilla/5.0 (Windows NT 5.1; rv:2.0) Gecko/20100101 Firefox/4.0': Moz (Gecko) with Accept-Encoding header === 2011-04-28 02:23:23,260 [or24] DEBUG XML - Parsed XML from C:\Documents and Settings\sg0209257\My Documents\built-in-ds\classes\artifacts\builtinds\ds\supplyItem.ds.xml: 0ms === 2011-04-28 02:23:23,291 [or25] INFO Compression - /builtinds/builtinds/builtinds.nocache.js: 7045 -> 2695 bytes === 2011-04-28 02:23:23,322 [or24] DEBUG XML - Parsed XML from C:\Documents and Settings\sg0209257\My Documents\built-in-ds\classes\artifacts\builtinds\ds\animals.ds.xml: 0ms === 2011-04-28 02:23:23,338 [or24] DEBUG XML - Parsed XML from C:\Documents and Settings\sg0209257\My Documents\built-in-ds\classes\artifacts\builtinds\ds\employees.ds.xml: 0ms === 2011-04-28 02:23:23,338 [or24] DEBUG XML - Parsed XML from C:\Documents and Settings\sg0209257\My Documents\built-in-ds\classes\artifacts\builtinds\ds\adb.ds.xml: 0ms === 2011-04-28 02:23:23,354 [or24] DEBUG XML - Parsed XML from C:\Documents and Settings\sg0209257\My Documents\built-in-ds\classes\artifacts\builtinds\builtinds\sc\system\schema\OperationBinding.ds.xml: 0ms === 2011-04-28 02:23:23,369 [or24] DEBUG XML - Parsed XML from C:\Documents and Settings\sg0209257\My Documents\built-in-ds\classes\artifacts\builtinds\builtinds\sc\system\schema\ServerObject.ds.xml: 0ms === 2011-04-28 02:23:23,416 [or24] INFO PoolableSQLConnectionFactory - No explicit configuration for db: jdbc/mdads in server.properties - will look for a Connection object at jdbc/mdads or java:comp/env/jdbc/mdads. === 2011-04-28 02:23:23,416 [or24] INFO PoolManager - SmartClient pooling disabled for 'jdbc/mdads' objects === 2011-04-28 02:23:23,416 [or24] DEBUG PoolableSQLConnectionFactory - Initializing SQL config for 'jdbc/mdads' via JNDI === 2011-04-28 02:23:23,416 [or24] DEBUG JNDI - No configuration for JNDI context '' - assuming default initialContext === 2011-04-28 02:23:23,416 [or24] DEBUG JNDI - No configuration for JNDI context '_container_' - assuming default initialContext === 2011-04-28 02:23:23,416 [or24] DEBUG JNDI - Detected container context, using new InitialContext(env) lookup method === 2011-04-28 02:23:23,525 [or25] INFO Compression - /builtinds/builtinds/sc/modules/ISC_Core.js: 666398 -> 172972 bytes === 2011-04-28 02:23:38,509 [or24] INFO PoolableSQLConnectionFactory - Auto-configuring connection to jdbc/mdads - connected to Oracle, version: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options via JDBC driver: Oracle JDBC driver, version: 9.2.0.1.0 === 2011-04-28 02:23:38,509 [or24] INFO PoolableSQLConnectionFactory - Derived DB type is: oracle === 2011-04-28 02:23:38,509 [or24] DEBUG PoolableSQLConnectionFactory - Returning unpooled Connection === 2011-04-28 02:23:38,572 [or24] DEBUG XML - Parsed XML from C:\Documents and Settings\sg0209257\My Documents\built-in-ds\classes\artifacts\builtinds\ds\productRevenue.ds.xml: 16ms === 2011-04-28 02:23:38,728 [or25] INFO Compression - /builtinds/builtinds/659CB7DB1C5198424BC66ECA1B785B43.cache.html: 110335 -> 29579 bytes === 2011-04-28 02:23:38,931 [or24] INFO RequestContext - URL: '/builtinds/builtinds/sc/IDACall', User-Agent: 'Mozilla/5.0 (Windows NT 5.1; rv:2.0) Gecko/20100101 Firefox/4.0': Moz (Gecko) with Accept-Encoding header === 2011-04-28 02:23:38,947 [or24] DEBUG XML - Parsed XML from (in memory stream): 16ms === 2011-04-28 02:23:38,947 [or24] DEBUG XML - Parsed XML from C:\Documents and Settings\sg0209257\My Documents\built-in-ds\classes\artifacts\builtinds\builtinds\sc\system\schema\List.ds.xml: 0ms === 2011-04-28 02:23:38,947 [or24] DEBUG RPCManager - Processing 1 requests. === 2011-04-28 02:23:38,978 [or24] DEBUG RPCManager - Request #1 (DSRequest) payload: { criteria:{ }, operationConfig:{ dataSource:"adb", operationType:"fetch" }, appID:"builtinApplication", operation:"cubeGrid", oldValues:{ } } === 2011-04-28 02:23:38,978 [or24] INFO IDACall - Performing 1 operation(s) === 2011-04-28 02:23:38,994 [or24] DEBUG AppBase - [builtinApplication.cubeGrid] No userTypes defined, allowing anyone access to all operations for this application === 2011-04-28 02:23:38,994 [or24] DEBUG AppBase - [builtinApplication.cubeGrid] No public zero-argument method named '_cubeGrid' found, performing generic datasource operation === 2011-04-28 02:23:38,994 [or24] INFO SQLDataSource - [builtinApplication.cubeGrid] Performing fetch operation with criteria: {} values: {} === 2011-04-28 02:23:39,009 [or24] INFO SQLWhereClause - [builtinApplication.cubeGrid] empty condition === 2011-04-28 02:23:39,009 [or24] INFO SQLDataSource - [builtinApplication.cubeGrid] derived query: SELECT orig,ORG_CTY_CD,ORG_CNTRY_CD,WACO,dest, DEST_CTY_CD,DEST_CNTRY_CD,WACD,dates FROM $defaultTableClause WHERE security_id ='120' AND orig in ('BOM','DEL','CCU') and DEST IN ('MAA','AMD','COM') and dates between 200901 and 200903 GROUP BY orig,ORG_CTY_CD,ORG_CNTRY_CD,WACO,dest, DEST_CTY_CD,DEST_CNTRY_CD,WACD,dates === 2011-04-28 02:23:39,212 [or24] DEBUG PoolableSQLConnectionFactory - [builtinApplication.cubeGrid] Returning unpooled Connection === 2011-04-28 02:23:39,212 [or24] INFO SQLDriver - [builtinApplication.cubeGrid] Executing SQL query on 'jdbc/mdads': SELECT orig,ORG_CTY_CD,ORG_CNTRY_CD,WACO,dest, DEST_CTY_CD,DEST_CNTRY_CD,WACD,dates FROM adb WHERE security_id ='120' AND orig in ('BOM','DEL','CCU') and DEST IN ('MAA','AMD','COM') and dates between 200901 and 200903 GROUP BY orig,ORG_CTY_CD,ORG_CNTRY_CD,WACO,dest, DEST_CTY_CD,DEST_CNTRY_CD,WACD,dates === 2011-04-28 02:23:41,462 [or25] INFO RequestContext - URL: '/builtinds/builtinds/sc/IDACall', User-Agent: 'Mozilla/5.0 (Windows NT 5.1; rv:2.0) Gecko/20100101 Firefox/4.0': Moz (Gecko) with Accept-Encoding header === 2011-04-28 02:23:41,462 [or25] DEBUG XML - Parsed XML from (in memory stream): 0ms === 2011-04-28 02:23:41,462 [or25] DEBUG RPCManager - Processing 1 requests. === 2011-04-28 02:23:41,462 [or25] DEBUG RPCManager - Request #1 (RPCRequest) data: { appID:"isc_builtin", className:"builtin", methodName:"getAvailableScriptEngines", arguments:[ ], is_ISC_RPC_DMI:true } === 2011-04-28 02:23:41,478 [or25] INFO IDACall - Performing 1 operation(s) === 2011-04-28 02:23:41,478 [or25] DEBUG XML - Parsed XML from jar:file:/C:/Documents%20and%20Settings/sg0209257/My%20Documents/built-in-ds/classes/artifacts/builtinds/WEB-INF/lib/isomorphic_core_rpc.jar!/isc_builtin.app.xml: 0ms === 2011-04-28 02:23:41,494 [or25] DEBUG XML - Parsed XML from C:\Documents and Settings\sg0209257\My Documents\built-in-ds\classes\artifacts\builtinds\builtinds\sc\system\schema\Method.ds.xml: 16ms === 2011-04-28 02:23:41,494 [or25] DEBUG RPCDMI - appConfig: isc.Application.create({ rpcBindings:[ { ID:"builtin", className:"com.isomorphic.rpc.BuiltinRPC", visibleMethods:[ { name:"downloadWSDL" }, { name:"downloadClientContent" }, { name:"downloadClientExport" }, { name:"xmlToJS" }, { name:"uploadProgressCheck" }, { name:"saveFile" }, { name:"appendToFile" }, { name:"loadFile" }, { name:"deleteFile" }, { name:"loadSharedXML" }, { name:"saveSharedXML" }, { name:"getAvailableScriptEngines" }, { name:"devConsoleEvalServerScript" }, { name:"evalJava" }, { name:"getLogNames" }, { name:"getLogEntries" }, { name:"getLogThresholds" }, { name:"setLogThreshold" } ] }, { ID:"builtin_tools", className:"com.isomorphic.tools.BuiltinRPC", visibleMethods:[ { name:"getDataSourceFromTable" }, { name:"getDataSourceJSONFromTable" }, { name:"getDataSourceFromHibernateMapping" }, { name:"getDataSourceJSONFromHibernateMapping" }, { name:"getTables" }, { name:"getFieldsFromTable" }, { name:"getBeanFields" }, { name:"getHibernateBeans" }, { name:"getDatabaseProductNameAndVersion" }, { name:"getDatabaseTableTypes" }, { name:"setAttributes" }, { name:"clearAttributes" }, { name:"getAttributes" }, { name:"getAttribute" }, { name:"getDataSourceConfigFromJavaClass" }, { args:"cName", language:"groovy", name:"getJavaSource", script:"\n if (!com.isomorphic.auth.DevModeAuthFilter.devModeAuthorized(request)) throw new Exception(\"Not Authorized\"); \n //import org.apache.bcel.Repository;\n\n try {\n return org.apache.bcel.Repository.lookupClass(cName).toString();\n } catch (Throwable e) {\n return \"Unable to reverse engineer class \"+cName+\": \"+e.getMessage();\n }\n " }, { name:"loadDataSource" }, { name:"dsFromXML" }, { name:"dsConfigFromXML" }, { name:"getDefinedDataSources" } ] }, { ID:"builtin_adminconsole", className:"com.isomorphic.tools.AdminConsole", visibleMethods:[ { name:"getDefinedDatabases" }, { name:"testDB" }, { name:"saveDBConfig" }, { name:"setDefaultDB" }, { name:"importDataSources" }, { name:"discoverJNDIDatabases" } ] } ] }) === 2011-04-28 02:23:41,509 [or25] DEBUG RPCDMI - Invocation threw exception === 2011-04-28 02:23:41,509 [or25] ERROR IDACall - Top-level servlet error: === 2011-04-28 02:23:41,509 [or25] INFO Compression - /builtinds/builtinds/sc/IDACall: 2853 -> 821 bytes === 2011-04-28 02:23:41,791 [or24] INFO DSResponse - [builtinApplication.cubeGrid] DSResponse: List with 18 items === 2011-04-28 02:23:41,791 [or24] DEBUG RPCManager - Content type for RPC transaction: text/plain; charset=UTF-8 === 2011-04-28 02:23:41,791 [or24] DEBUG RPCManager - non-DMI response, dropExtraFields: false === 2011-04-28 02:23:41,791 [or24] INFO Compression - /builtinds/builtinds/sc/IDACall: 1880 -> 280 bytes === 2011-04-28 02:23:41,978 [or25] INFO RequestContext - URL: '/builtinds/builtinds/sc/IDACall', User-Agent: 'Mozilla/5.0 (Windows NT 5.1; rv:2.0) Gecko/20100101 Firefox/4.0': Moz (Gecko) with Accept-Encoding header === 2011-04-28 02:23:41,994 [or25] DEBUG XML - Parsed XML from (in memory stream): 16ms === 2011-04-28 02:23:42,009 [or25] DEBUG RPCManager - Processing 4 requests. === 2011-04-28 02:23:42,009 [or25] DEBUG RPCManager - Request #1 (DSRequest) payload: { criteria:{ ORIG:"ORIG_CNTRY_IN", DEST:[ "CNTRY_IN", "MAA", "AMD", "COM" ], dates:[ "200901", "200902", "200903" ] }, operationConfig:{ dataSource:"adb", operationType:"fetch" }, appID:"builtinApplication", operation:"adb_fetch", oldValues:{ ORIG:"ORIG_CNTRY_IN", DEST:[ "CNTRY_IN", "MAA", "AMD", "COM" ], dates:[ "200901", "200902", "200903" ] } } === 2011-04-28 02:23:42,025 [or25] DEBUG RPCManager - Request #2 (DSRequest) payload: { criteria:{ ORIG:"BOM", DEST:[ "CNTRY_IN", "MAA", "AMD", "COM" ], dates:[ "200901", "200902", "200903" ] }, operationConfig:{ dataSource:"adb", operationType:"fetch" }, appID:"builtinApplication", operation:"adb_fetch", oldValues:{ ORIG:"BOM", DEST:[ "CNTRY_IN", "MAA", "AMD", "COM" ], dates:[ "200901", "200902", "200903" ] } } === 2011-04-28 02:23:42,025 [or25] DEBUG RPCManager - Request #3 (DSRequest) payload: { criteria:{ ORIG:"DEL", DEST:[ "CNTRY_IN", "MAA", "AMD", "COM" ], dates:[ "200901", "200902", "200903" ] }, operationConfig:{ dataSource:"adb", operationType:"fetch" }, appID:"builtinApplication", operation:"adb_fetch", oldValues:{ ORIG:"DEL", DEST:[ "CNTRY_IN", "MAA", "AMD", "COM" ], dates:[ "200901", "200902", "200903" ] } } === 2011-04-28 02:23:42,025 [or25] DEBUG RPCManager - Request #4 (DSRequest) payload: { criteria:{ ORIG:"CCU", DEST:[ "CNTRY_IN", "MAA", "AMD", "COM" ], dates:[ "200901", "200902", "200903" ] }, operationConfig:{ dataSource:"adb", operationType:"fetch" }, appID:"builtinApplication", operation:"adb_fetch", oldValues:{ ORIG:"CCU", DEST:[ "CNTRY_IN", "MAA", "AMD", "COM" ], dates:[ "200901", "200902", "200903" ] } } === 2011-04-28 02:23:42,025 [or25] INFO IDACall - Performing 4 operation(s) === 2011-04-28 02:23:42,040 [or25] DEBUG AppBase - [builtinApplication.adb_fetch] No userTypes defined, allowing anyone access to all operations for this application === 2011-04-28 02:23:42,040 [or25] DEBUG AppBase - [builtinApplication.adb_fetch] No public zero-argument method named '_adb_fetch' found, performing generic datasource operation === 2011-04-28 02:23:42,040 [or25] INFO SQLDataSource - [builtinApplication.adb_fetch] Performing fetch operation with criteria: {ORG_CNTRY_CD:"ORIG_CNTRY_IN",DEST_CNTRY_CD:["CNTRY_IN","MAA","AMD","COM"]} values: {ORG_CNTRY_CD:"ORIG_CNTRY_IN",DEST_CNTRY_CD:["CNTRY_IN","MAA","AMD","COM"]} === 2011-04-28 02:23:42,040 [or25] INFO SQLDataSource - [builtinApplication.adb_fetch] derived query: SELECT ORIG,DEST,dates,sum(PAX_COUNT) as bookings FROM $defaultTableClause WHERE security_id ='120' AND orig in ('BOM','DEL','CCU') and DEST IN ('MAA','AMD','COM') and dates between 200901 and 200903 and ($defaultWhereClause) GROUP BY ORIG,DEST,dates === 2011-04-28 02:23:42,040 [or25] DEBUG PoolableSQLConnectionFactory - [builtinApplication.adb_fetch] Returning unpooled Connection === 2011-04-28 02:23:42,072 [or25] INFO SQLDriver - [builtinApplication.adb_fetch] Executing SQL query on 'jdbc/mdads': SELECT ORIG,DEST,dates,sum(PAX_COUNT) as bookings FROM adb WHERE security_id ='120' AND orig in ('BOM','DEL','CCU') and DEST IN ('MAA','AMD','COM') and dates between 200901 and 200903 and (('1'='1')) GROUP BY ORIG,DEST,dates === 2011-04-28 02:23:43,869 [or24] INFO RequestContext - URL: '/builtinds/builtinds/sc/IDACall', User-Agent: 'Mozilla/5.0 (Windows NT 5.1; rv:2.0) Gecko/20100101 Firefox/4.0': Moz (Gecko) with Accept-Encoding header === 2011-04-28 02:23:43,869 [or24] INFO Compression - /builtinds/builtinds/sc/IDACall: 81 -> 86 bytes === 2011-04-28 02:23:44,009 [or24] INFO RequestContext - URL: '/builtinds/builtinds/sc/IDACall', User-Agent: 'Mozilla/5.0 (Windows NT 5.1; rv:2.0) Gecko/20100101 Firefox/4.0': Moz (Gecko) with Accept-Encoding header
Last edited by curiousgally; 27 Apr 2011, 13:12.
Comment
-
I'm working on manually changing the query fired to fetch data in cube grid.
How is the default where clause constructed in case of cubegrid data fetch.
Because in my sample. I have put fixed facet value : ("security_id:'120')
I see it in the search criteria along with other criteria generated by Cube Grid facets etc.
but it is not present in the final query
So need clarity on how things happen behind the scenes.
Also,
I observed that using DMI, when i manipulate the criteria entries, those entries are missing in the final query (though they show up in the criteria like security_id ).
Following is the log output.
Code:== 2011-04-28 18:29:05,690 [or24] INFO IDACall - Performing 1 operation(s) === 2011-04-28 18:29:05,690 [or24] DEBUG AppBase - [builtinApplication.adb_fetch] No userTypes defined, allowing anyone access to all operations for this application === 2011-04-28 18:29:05,690 [or24] DEBUG AppBase - [builtinApplication.adb_fetch] No public zero-argument method named '_adb_fetch' found, performing generic datasource operation === 2011-04-28 18:29:05,690 [or24] INFO SQLDataSource - [builtinApplication.adb_fetch] Performing fetch operation with criteria: {security_id:"120",ORIG:"CO_IN",DEST:["CO_IN"],dates:["200901","200902","200903"]} values: {security_id:"120",ORIG:"CO_IN",DEST:["CO_IN"],dates:["200901","200902","200903"]} === 2011-04-28 18:29:05,706 [or24] INFO SQLDataSource - [builtinApplication.adb_fetch] derived query: SELECT ORIG ,DEST , dates,sum(PAX_COUNT) as bookings FROM $defaultTableClause WHERE $defaultWhereClause GROUP BY ORIG , DEST, dates === 2011-04-28 18:29:05,721 [or24] DEBUG PoolableSQLConnectionFactory - [builtinApplication.adb_fetch] Returning unpooled Connection === 2011-04-28 18:29:05,721 [or24] INFO SQLDriver - [builtinApplication.adb_fetch] Executing SQL query on 'jdbc/mdads': SELECT ORIG , DEST , dates,sum(PAX_COUNT) as bookings FROM adb WHERE (ORIG='CO_IN' AND ((DEST='CO_IN')) AND ((dates=200901) OR (dates=200902) OR (dates=200903))) GROUP BY ORIG , DEST , dates
Comment
-
I have the following as facets :
Row: "ORIG","DEST"
Column:"dates"
valueProperty:"bookings"
So as per my understanding the cube queries follow this sequence:
"Select ORIG, DEST, dates, bookings from table where Orig in (....) and dest in (....) and dates in (.....) "
Due to some constraints i had to use DMI to construct this query as per my needs :
The query that runs is :
Code:SELECT ORG_CNTRY_CD as ORIG , DEST_CNTRY_CD as DEST , dates,sum(PAX_COUNT) as bookings FROM adb WHERE (((dates=200901) OR (dates=200902) OR (dates=200903)) AND ORG_CNTRY_CD='IN' AND ((DEST_CNTRY_CD='IN'))) GROUP BY ORG_CNTRY_CD , DEST_CNTRY_CD , dates
ORIG DEST DATES BOOKINGS
---- ---- ---------------------- ----------------------
IN IN 200903 2859978
IN IN 200901 2905274
IN IN 200902 2875460
bUT THE CUBE DOESN'T SEEM TO TAKE THE DATA FOR THE ROW ----> IN, IN,
SO DO V NEED TO DO SOMETHING TO SET DATA WHEN USING DMI MECHANISM TO CHANGE CRITERIA.
Comment
-
it matches:
code that sets up the facets:
Code:advancedCube.setValueProperty("bookings"); advancedCube.setRowFacets("ORIG", "DEST"); advancedCube.setColumnFacets("dates");
Code:[ { queueStatus:0, invalidateCache:false, endRow:3, data:[ { DEST:"IN", ORIG:"IN", bookings:2875460, dates:200902 }, { DEST:"IN", ORIG:"IN", bookings:2905274, dates:200901 }, { DEST:"IN", ORIG:"IN", bookings:2859978, dates:200903 } ], status:0, startRow:0, totalRows:3, isDSResponse:true } ]
Last edited by curiousgally; 28 Apr 2011, 07:57.
Comment
-
Got it...
The tweak you suggested yesterday to identify country and airport. So i need to recreate the data to incorporate the country identifier.
But is there not a simpler approach like setting a property for a facet value which becomes available in the DMI method.
This use case i suppose would be required by many. i.e creating a hirerachical facet with data mapped from multiple database columns. And then able to configure cube grid to query appropriate columns.
Hope you get what i meant.
So something more easier approach would be helpful instead of handling and tweaking the data.
Comment
-
If you perceive a lot of effort here you might be doing more than you need to?
All you need is:
1. a DMI or customized SQL to add a prefix on the way out of the database
2. a DMI to change the fieldNames in criteria according to prefix
Should be just a few lines of code.. less than that sounds magical.
Comment
Comment