[JBoss JIRA] (TEIID-3636) SalesForce.com aggregate function query issues
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-3636?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-3636:
---------------------------------------
Even the limit / offset solution is not ideal as the query performance could suffer if not much aggregation is being performed - as each fetch would be a separate query. In many instances it would be just as fast to pull all of the data and perform the aggregation in Teiid. The ideal solution would probably be to attempt the one shot query and then fall back on pulling all of the rows. However this doesn't fit well with our planning structures.
> SalesForce.com aggregate function query issues
> ----------------------------------------------
>
> Key: TEIID-3636
> URL: https://issues.jboss.org/browse/TEIID-3636
> Project: Teiid
> Issue Type: Quality Risk
> Components: Query Engine
> Affects Versions: 8.7.1
> Environment: RHEL 6, AWS VM, JBoss EAP (standalone) 6.3.2.GA
> JBoss Data Virtualization 6.1.0.ER4
> Reporter: Jorge Herrera
> Assignee: Steven Hawkins
> Priority: Minor
> Fix For: 8.12
>
>
> When executing a query against salesforce.com with an aggregate function (select max(), min(), sum() ) With a 'group by' clause with a 'SalesForce ID' returns with the following error:
> TEIID30504 Remote org.teiid.core.TeiidProcessingException: TEIID30504 SalesForce_Sales: com.sforce.soap.partner.UnexpectedErrorFault: EXCEEDED_ID_LIMIT: Aggregate query does not support queryMore(), use LIMIT to restrict the results to a single batch [SQL State=50000, DB Errorcode=30504]
> Example Queries That FAIL:
> ----------
> SELECT accountid, sum(amount)
> FROM salesforce_sales.salesforce.opportunity where closedate > '2016-02-01'
> group by accountid;
> ----------
> SELECT aid, sum(amt) from (
> SELECT accountid aid, amount amt FROM salesforce_sales.salesforce.opportunity where closedate > '2016-02-01'
> ) as tmp group by aid;
> Queries that DO Work:
> SELECT closedate, sum(amount)
> FROM salesforce_sales.salesforce.opportunity where closedate > '2016-02-01' group by closedate
> ;
> SELECT isdeleted, sum(amount)
> FROM salesforce_sales.salesforce.opportunity where closedate > '2016-02-01' group by isdeleted
> ;
> SELECT campaignid, sum(amount)
> FROM salesforce_sales.salesforce.opportunity where closedate > '2016-02-01' group by campaignid
> ;
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years, 6 months
[JBoss JIRA] (TEIID-2729) Dynamic VDB xml requires sibling elements to be in a certain order
by Ramesh Reddy (JIRA)
[ https://issues.jboss.org/browse/TEIID-2729?page=com.atlassian.jira.plugin... ]
Ramesh Reddy commented on TEIID-2729:
-------------------------------------
IMO, validation out weighs the convenience. Granted we can remove validation, then we need to do certain tasks in code, which seems counter intuitive.
May be can put choice block around property, duplicate it before and after like
{code}
<xs:element name="description" type="xs:string" minOccurs="0"/>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="property" type="property"/>
<xs:choice>
<xs:element name="source" minOccurs="0" maxOccurs="unbounded">
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="property" type="property"/>
<xs:choice>
{code}
Not even sure that is valid, sure does looks like a hack.
> Dynamic VDB xml requires sibling elements to be in a certain order
> ------------------------------------------------------------------
>
> Key: TEIID-2729
> URL: https://issues.jboss.org/browse/TEIID-2729
> Project: Teiid
> Issue Type: Enhancement
> Components: AdminApi
> Affects Versions: 8.5
> Reporter: Mark Drilling
> Assignee: Steven Hawkins
> Fix For: 8.7
>
>
> In my *-vdb.xml, I have a model defined per following snippet:
> <model name="myModel" type="PHYSICAL" visible="true">
> <source name="myModel" translator-name="hive" connection-jndi-name="Hive12Src" />
> <property name="trimColumnNames" value="true" />
> </model>
> The vdb.xml failed to parse, so I moved the <property> element ahead of <source> and then it worked.
> I don't think element ordering should matter in this case?
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years, 6 months
[JBoss JIRA] (TEIID-3589) MongoDB metadata import fails with NPE
by Ramesh Reddy (JIRA)
[ https://issues.jboss.org/browse/TEIID-3589?page=com.atlassian.jira.plugin... ]
Ramesh Reddy resolved TEIID-3589.
---------------------------------
Resolution: Done
Marking resolved as requested information is not presented. Open another JIRA if required.
> MongoDB metadata import fails with NPE
> --------------------------------------
>
> Key: TEIID-3589
> URL: https://issues.jboss.org/browse/TEIID-3589
> Project: Teiid
> Issue Type: Bug
> Components: JDBC Connector
> Affects Versions: 8.7.1.6_2
> Reporter: Van Halbert
> Assignee: Ramesh Reddy
> Labels: Beta1, ER5
> Fix For: 8.7.1.6_2, 8.12
>
>
> Deploying the following dynamic vdb fails with a NullPointerException when Teiid Connection importer is used:
> {code}
> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
> <vdb name="mongo" version="1">
> <description>Importer VDB</description>
> <property name="UseConnectorMetadata" value="true" />
> <property name="deployment-name" value="mongo-vdb.xml" />
> <model name="importVDBSrcModel">
> <source name="importVDBSrcModel" translator-name="mongodb" connection-jndi-name="java:/mongoDS" />
> </model>
> </vdb>
> {code}
> The resource adapter is defined as:
> {code}
> <resource-adapter id="mongoDS">
> <module slot="main" id="org.jboss.teiid.resource-adapter.mongodb"/>
> <transaction-support>NoTransaction</transaction-support>
> <connection-definitions>
> <connection-definition class-name="org.teiid.resource.adapter.mongodb.MongoDBManagedConnectionFactory" jndi-name="java:/mongoDS" enabled="true" use-java-context="true" pool-name="mongoDS">
> <config-property name="Database">
> bqt
> </config-property>
> <config-property name="RemoteServerList">
> vmgdb01.mw.lab.eng.bos.redhat.com:27017
> </config-property>
> <config-property name="Username">
> dv
> </config-property>
> <config-property name="Password">
> dv
> </config-property>
> </connection-definition>
> </connection-definitions>
> </resource-adapter>
> {code}
> Server log:
> {code}
> 16:46:49,793 INFO [org.jboss.as.server.deployment] (MSC service thread 1-7) JBAS015876: Starting deployment of "mongo-vdb.xml" (runtime-name: "mongo-vdb.xml")
> 16:46:49,809 DEBUG [org.teiid.RUNTIME] (MSC service thread 1-5) VDB mongo-vdb.xml has been parsed.
> 16:46:49,835 INFO [org.teiid.RUNTIME] (MSC service thread 1-1) TEIID50029 VDB mongo.1 model "importVDBSrcModel" metadata is currently being loaded. Start Time: 7/23/15 4:46 PM
> 16:46:49,869 INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS015859: Deployed "mongo-vdb.xml" (runtime-name : "mongo-vdb.xml")
> 16:46:50,626 WARN [org.teiid.RUNTIME] (teiid-async-threads - 3) TEIID50036 VDB mongo.1 model "importVDBSrcModel" metadata failed to load. Reason:java.lang.NullPointerException: java.lang.NullPointerException
> at org.teiid.translator.mongodb.MongoDBMetadataProcessor.addTable(MongoDBMetadataProcessor.java:92)
> at org.teiid.translator.mongodb.MongoDBMetadataProcessor.process(MongoDBMetadataProcessor.java:57)
> at org.teiid.translator.mongodb.MongoDBMetadataProcessor.process(MongoDBMetadataProcessor.java:38)
> at org.teiid.translator.ExecutionFactory.getMetadata(ExecutionFactory.java:935) [teiid-api-8.7.1.6_2-redhat-3.jar:8.7.1.6_2-redhat-3]
> at org.teiid.query.metadata.NativeMetadataRepository.loadMetadata(NativeMetadataRepository.java:73) [teiid-engine-8.7.1.6_2-redhat-3.jar:8.7.1.6_2-redhat-3]
> at org.teiid.query.metadata.ChainingMetadataRepository.loadMetadata(ChainingMetadataRepository.java:55) [teiid-engine-8.7.1.6_2-redhat-3.jar:8.7.1.6_2-redhat-3]
> at org.teiid.jboss.VDBService$6.run(VDBService.java:395) [teiid-jboss-integration-8.7.1.6_2-redhat-3.jar:8.7.1.6_2-redhat-3]
> at org.teiid.jboss.VDBService$7.run(VDBService.java:442) [teiid-jboss-integration-8.7.1.6_2-redhat-3.jar:8.7.1.6_2-redhat-3]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_79]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_79]
> at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_79]
> at org.jboss.threads.JBossThread.run(JBossThread.java:122)
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years, 6 months
[JBoss JIRA] (TEIID-2729) Dynamic VDB xml requires sibling elements to be in a certain order
by Ramesh Reddy (JIRA)
[ https://issues.jboss.org/browse/TEIID-2729?page=com.atlassian.jira.plugin... ]
Ramesh Reddy commented on TEIID-2729:
-------------------------------------
Ignore the attribute comment, I misunderstood.
Is there any limitation moving to XSD 1.1? That seems to solve the issue.
> Dynamic VDB xml requires sibling elements to be in a certain order
> ------------------------------------------------------------------
>
> Key: TEIID-2729
> URL: https://issues.jboss.org/browse/TEIID-2729
> Project: Teiid
> Issue Type: Enhancement
> Components: AdminApi
> Affects Versions: 8.5
> Reporter: Mark Drilling
> Assignee: Steven Hawkins
> Fix For: 8.7
>
>
> In my *-vdb.xml, I have a model defined per following snippet:
> <model name="myModel" type="PHYSICAL" visible="true">
> <source name="myModel" translator-name="hive" connection-jndi-name="Hive12Src" />
> <property name="trimColumnNames" value="true" />
> </model>
> The vdb.xml failed to parse, so I moved the <property> element ahead of <source> and then it worked.
> I don't think element ordering should matter in this case?
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years, 6 months
[JBoss JIRA] (TEIID-3564) float field gets converted to scientific notation when query is submitted to source
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/TEIID-3564?page=com.atlassian.jira.plugin... ]
RH Bugzilla Integration updated TEIID-3564:
-------------------------------------------
Bugzilla References: https://bugzilla.redhat.com/show_bug.cgi?id=1265772
Bugzilla Update: Perform
> float field gets converted to scientific notation when query is submitted to source
> -----------------------------------------------------------------------------------
>
> Key: TEIID-3564
> URL: https://issues.jboss.org/browse/TEIID-3564
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 8.7.1
> Environment: RHEL 6, AWS Virtual Machine, salesforce.com soap api 23.0,JBoss EAP (standalone) 6.3.2.GA
> JBoss Data Virtualization 6.1.0.ER4
> Reporter: Jorge Herrera
> Assignee: Steven Hawkins
> Fix For: 8.12, 8.11.5
>
>
> When submitting the following query:
> SELECT COUNT(*) FROM salesforce_sales.salesforce.Opportunity where amount > 100000000;
> to a salesforce instance with the shown filter it returns the following error:
> org.teiid.runtime.client.TeiidClientException: java.lang.RuntimeException: Remote org.teiid.core.TeiidProcessingException: TEIID30504 SalesForce_Sales: com.sforce.soap.partner.MalformedQueryFault: MALFORMED_QUERY:
> Opportunity WHERE Opportunity.Amount > 1.0E8
> ^
> ERROR at Row:1:Column:64
> unexpected token: 'E8'
> Elapsed Time: 0 hr, 0 min, 1 sec, 109 ms.
> why is the quantity modified when the field is declared as float?
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years, 6 months
[JBoss JIRA] (TEIID-2729) Dynamic VDB xml requires sibling elements to be in a certain order
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-2729?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-2729:
---------------------------------------
> I do not care much about the placement of elements if there is a way we can do that
That's exactly what we're saying here. The parsing logic effectively doesn't care, but would need a bit of refinement to be more strict (ensure only one of some elements, correct attributes, etc.). The xsd does care - and there's not a simple change to relax it that I can see.
> I would rather be strict than try to interpret what those wrong attributes mean.
You mean strict in the parsing correct?
> Dynamic VDB xml requires sibling elements to be in a certain order
> ------------------------------------------------------------------
>
> Key: TEIID-2729
> URL: https://issues.jboss.org/browse/TEIID-2729
> Project: Teiid
> Issue Type: Enhancement
> Components: AdminApi
> Affects Versions: 8.5
> Reporter: Mark Drilling
> Assignee: Steven Hawkins
> Fix For: 8.7
>
>
> In my *-vdb.xml, I have a model defined per following snippet:
> <model name="myModel" type="PHYSICAL" visible="true">
> <source name="myModel" translator-name="hive" connection-jndi-name="Hive12Src" />
> <property name="trimColumnNames" value="true" />
> </model>
> The vdb.xml failed to parse, so I moved the <property> element ahead of <source> and then it worked.
> I don't think element ordering should matter in this case?
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years, 6 months
[JBoss JIRA] (TEIID-3636) SalesForce.com aggregate function query issues
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-3636?page=com.atlassian.jira.plugin... ]
Work on TEIID-3636 started by Steven Hawkins.
---------------------------------------------
> SalesForce.com aggregate function query issues
> ----------------------------------------------
>
> Key: TEIID-3636
> URL: https://issues.jboss.org/browse/TEIID-3636
> Project: Teiid
> Issue Type: Quality Risk
> Components: Query Engine
> Affects Versions: 8.7.1
> Environment: RHEL 6, AWS VM, JBoss EAP (standalone) 6.3.2.GA
> JBoss Data Virtualization 6.1.0.ER4
> Reporter: Jorge Herrera
> Assignee: Steven Hawkins
> Priority: Minor
> Fix For: 8.12
>
>
> When executing a query against salesforce.com with an aggregate function (select max(), min(), sum() ) With a 'group by' clause with a 'SalesForce ID' returns with the following error:
> TEIID30504 Remote org.teiid.core.TeiidProcessingException: TEIID30504 SalesForce_Sales: com.sforce.soap.partner.UnexpectedErrorFault: EXCEEDED_ID_LIMIT: Aggregate query does not support queryMore(), use LIMIT to restrict the results to a single batch [SQL State=50000, DB Errorcode=30504]
> Example Queries That FAIL:
> ----------
> SELECT accountid, sum(amount)
> FROM salesforce_sales.salesforce.opportunity where closedate > '2016-02-01'
> group by accountid;
> ----------
> SELECT aid, sum(amt) from (
> SELECT accountid aid, amount amt FROM salesforce_sales.salesforce.opportunity where closedate > '2016-02-01'
> ) as tmp group by aid;
> Queries that DO Work:
> SELECT closedate, sum(amount)
> FROM salesforce_sales.salesforce.opportunity where closedate > '2016-02-01' group by closedate
> ;
> SELECT isdeleted, sum(amount)
> FROM salesforce_sales.salesforce.opportunity where closedate > '2016-02-01' group by isdeleted
> ;
> SELECT campaignid, sum(amount)
> FROM salesforce_sales.salesforce.opportunity where closedate > '2016-02-01' group by campaignid
> ;
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years, 6 months