Uploaded image for project: 'Teiid'
  1. Teiid
  2. TEIID-3636

SalesForce.com aggregate function query issues

XMLWordPrintable

    • Icon: Quality Risk Quality Risk
    • Resolution: Done
    • Icon: Minor Minor
    • 8.12
    • 8.7.1
    • Query Engine
    • None

      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
      ;

            rhn-engineering-shawkins Steven Hawkins
            jherrera1@redhat.com Jorge Herrera (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: