Skip to main content
Hello, I have an issue with the Bulk Query functionality, I'm using the query: Select pd__c from Product__c group by pd__c and I'm getting the error: InvalidBatch : Failed to process query: FUNCTIONALITY_NOT_ENABLED: Aggregate Relationships not supported in Bulk Query, Do you know why is not working fine, I'm only using GROUP BY for getting distinct values??
4 respuestas
  1. 21 jun 2017, 04:13
    Hi Jamie,

    Based on the error : Yes,Aggregate functions are not supported in bulk API . The whole purpose for build API is to work with large data sets.

    https://help.qlik.com/en-US/connectors/Subsystems/Salesforce_Connector_QV_help/Content/13.1/Create-Salesforce-connection/Specify-data-load-properties.htm

    If you hit the governor limit due to bulk records then refer this:

    https://salesforce.stackexchange.com/questions/145548/how-aggregate-result-are-count-against-the-governor-limits

    https://salesforce.stackexchange.com/questions/7439/soql-aggregate-query-limit

    The number of queried records is what is counted against you. Even if you only get one AggregateResult row back, if that row is tallied from 50,000 records, then you'll exceed the governor limit.

    May be try to reduce the query results with where clause or limit function or batch the records using batch class.

    Batch class Aggregate help: https://help.salesforce.com/articleView?id=000192834&language=en_US&type=1

    Can you please Let me know if it helps or not!!!

    If it helps don't forget to mark this as a best answer!!!

    Thanks,

    ​Raj
0/9000