Happy Business Starts Here

Highlighted
Savvy Scholar

[AQUA] 90007 Error Code (query is aborted)

Environment: Sandbox API (https://apisandbox.zuora.com/apps/api/batch-query/)

Problem Statement: There are some Data Source which cannot be queried for all pre-joined objects, even if the query does not exceed 20.000 characters. The response of job status is always 'aborted' with 90007 error code. Please find below the full list of those queries:

 

select InvoiceItemAdjustment.*,Account.*,AccountingPeriod.*,AccountReceivableAccountingCode.*,Amendment.*,BillToContact.*,DefaultPaymentMethod.*,DeferredRevenueAccountingCode.*,Invoice.*,InvoiceItem.*,JournalEntry.*,JournalRun.*,ParentAccount.*,Product.*,ProductRatePlan.*,ProductRatePlanCharge.*,RatePlan.*,RatePlanCharge.*,RecognizedRevenueAccountingCode.*,SalesTaxPayableAccountingCode.*,SoldToContact.*,Subscription.*,TaxationItem.* from InvoiceItemAdjustment
select InvoiceItem.*,Account.*,AccountingPeriod.*,AccountReceivableAccountingCode.*,Amendment.*,BillToContact.*,DefaultPaymentMethod.*,DeferredRevenueAccountingCode.*,Invoice.*,JournalEntry.*,JournalRun.*,ParentAccount.*,Product.*,ProductRatePlan.*,ProductRatePlanCharge.*,RatePlan.*,RatePlanCharge.*,RecognizedRevenueAccountingCode.*,SoldToContact.*,Subscription.* from InvoiceItem
select RevenueEventItem.*,Account.*,AccountingPeriod.*,Amendment.*,BillToContact.*,DefaultPaymentMethod.*,DeferredRevenueAccountingCode.*,JournalEntry.*,JournalRun.*,ParentAccount.*,Product.*,ProductRatePlan.*,ProductRatePlanCharge.*,RatePlan.*,RatePlanCharge.*,RecognizedRevenueAccountingCode.*,RevenueChargeSummary.*,RevenueEvent.*,RevenueEventType.*,RevenueSchedule.*,SoldToContact.*,Subscription.* from RevenueEventItem
select RevenueEventItemInvoiceItemAdjustment.*,Account.*,AccountingPeriod.*,Amendment.*,BillToContact.*,DefaultPaymentMethod.*,DeferredRevenueAccountingCode.*,Invoice.*,InvoiceItem.*,InvoiceItemAdjustment.*,JournalEntry.*,JournalRun.*,ParentAccount.*,Product.*,ProductRatePlan.*,ProductRatePlanCharge.*,RatePlan.*,RatePlanCharge.*,RecognizedRevenueAccountingCode.*,RevenueChargeSummary.*,RevenueEventInvoiceItemAdjustment.*,RevenueEventType.*,RevenueScheduleInvoiceItemAdjustment.*,SoldToContact.*,Subscription.* from RevenueEventItemInvoiceItemAdjustment
select RevenueEventItemInvoiceItem.*,Account.*,AccountingPeriod.*,Amendment.*,BillToContact.*,DefaultPaymentMethod.*,DeferredRevenueAccountingCode.*,Invoice.*,InvoiceItem.*,JournalEntry.*,JournalRun.*,ParentAccount.*,Product.*,ProductRatePlan.*,ProductRatePlanCharge.*,RatePlan.*,RatePlanCharge.*,RecognizedRevenueAccountingCode.*,RevenueChargeSummary.*,RevenueEventInvoiceItem.*,RevenueEventType.*,RevenueScheduleInvoiceItem.*,SoldToContact.*,Subscription.* from RevenueEventItemInvoiceItem
select RevenueScheduleItem.*,Account.*,AccountingPeriod.*,Amendment.*,BillToContact.*,DefaultPaymentMethod.*,DeferredRevenueAccountingCode.*,ParentAccount.*,Product.*,ProductRatePlan.*,ProductRatePlanCharge.*,RatePlan.*,RatePlanCharge.*,RecognizedRevenueAccountingCode.*,RevenueChargeSummary.*,RevenueSchedule.*,SoldToContact.*,Subscription.* from RevenueScheduleItem
select RevenueScheduleItemInvoiceItemAdjustment.*,Account.*,AccountingPeriod.*,Amendment.*,BillToContact.*,DefaultPaymentMethod.*,DeferredRevenueAccountingCode.*,Invoice.*,InvoiceItem.*,InvoiceItemAdjustment.*,ParentAccount.*,Product.*,ProductRatePlan.*,ProductRatePlanCharge.*,RatePlan.*,RatePlanCharge.*,RecognizedRevenueAccountingCode.*,RevenueChargeSummary.*,RevenueScheduleInvoiceItemAdjustment.*,SoldToContact.*,Subscription.* from RevenueScheduleItemInvoiceItemAdjustment
select RevenueScheduleItemInvoiceItem.*,Account.*,AccountingPeriod.*,Amendment.*,BillToContact.*,DefaultPaymentMethod.*,DeferredRevenueAccountingCode.*,Invoice.*,InvoiceItem.*,ParentAccount.*,Product.*,ProductRatePlan.*,ProductRatePlanCharge.*,RatePlan.*,RatePlanCharge.*,RecognizedRevenueAccountingCode.*,RevenueChargeSummary.*,RevenueScheduleInvoiceItem.*,SoldToContact.*,Subscription.* from RevenueScheduleItemInvoiceItem
select TaxationItem.*,Account.*,AccountingPeriod.*,AccountReceivableAccountingCode.*,Amendment.*,BillToContact.*,DefaultPaymentMethod.*,Invoice.*,InvoiceItem.*,JournalEntry.*,JournalRun.*,ParentAccount.*,Product.*,ProductRatePlan.*,ProductRatePlanCharge.*,RatePlan.*,RatePlanCharge.*,SalesTaxPayableAccountingCode.*,SoldToContact.*,Subscription.* from TaxationItem

Response:

{
  "errorCode": "90007",
  "message": "null, ErrorCode=90007,Message=",
  "batches": [
    {
      "localizedStatus": "pending",
      "recordCount": 0,
      "batchId": "2c92c0f8589a05e401589a60d5637774",
      "apiVersion": "81.0",
      "batchType": "zoqlexport",
      "full": true,
      "status": "pending",
      "name": "foo",
      "query": "..."
    }
  ],
  "useLastCompletedJobQueries": false,
  "encrypted": "none",
  "status": "aborted",
  "version": "1.0",
  "startTime": "2016-11-24T23:26:27-0800",
  "format": "GZIP",
  "name": "bar",
  "id": "2c92c0f8589a05e401589a60d5617773"
}

Question: what is the root cause and how to resolve it?

Tags (2)
1 REPLY 1
Community Manager

RE: [AQUA] 90007 Error Code (query is aborted)

Aborted in general appears when execution stopped because one of the queries failed or some exception occurred during the execution.
 
Digging further in our backend logs, we've confirmed that the calls you've invoked indeed encountered some exception since it is hitting the limitation of the number of fields selected. Different data source have complex prejoins and MySQL can only use 61 tables in a join.
 
Error Message : Exception
Stack Trace: java.sql.SQLException: Too many tables; 
...GenericJDBCException: could not execute query using scroll
 
If you pass the same exact query via DataSources, you will be getting error a more comprehensible error, instead of just "Aborted ( 90007 Error Code) ". The error would be "...export status = Failed, reason: XXXXXX: Too many selected objects.​​"
 
The team will work to better the error messaging and for this particular case , the please do refine the export conditions used and only select items you need. We have listed all possible fields in Data Source , but we recommend that not all fields at a time.


Subscribe to Zuora System Updates at Zuora Trust
Follow Zuora Global Support on Twitter and LinkedIn