Happy Business Starts Here

"There is a syntax error in one of the queries in the AQuA input" using "type" = "zoqlexport"

Highlighted
Support SME
Support SME

"There is a syntax error in one of the queries in the AQuA input" using "type" = "zoqlexport"

Question or Problem Statement:
When I send a AQUA query, I get "There is a syntax error in one of the queries in the AQuA input". However, this query works good in a SOAP API query call.

 

For example,
Select Id, AccountNumber, BillToId, SoldToId From Account
error: There is a syntax error in one of the queries in the AQuA input

 

1.png

However, in the SOAP query call below, it works good. Why?
<ns1:query>
    <ns1:queryString>Select Id, AccountNumber, BillToId, SoldToId From Account</ns1:queryString>
</ns1:query>
2.png

 

3.png






If you found my answer helpful, please give me a kudo ↑
Help others find answers faster by accepting my post as a solution √

Tags (3)
1 REPLY 1
Support SME
Support SME

Re: "There is a syntax error in one of the queries in the AQuA input" using "type&quo

Solution:
Please note that SOAP API query is different to ZOQL Export query, meaning that a field is available in SOAP API query, it does not mean that this field is available/supported in ZOQL Export query as well. In this sample, there is not a field of "BillToIdId" in Account object if you look at DataSourceExport in the UI, either in the description doc below:

For example, in my sandbox.
https://apisandbox-api.zuora.com/apps/api/describe/Account?format=html&context=export

But in https://apisandbox-api.zuora.com/apps/api/describe/Contact?format=html&context=export, we can find the ID, so the ZOQL Export query would be:
Select Id, AccountNumber, BillToContact.Id, SoldToContact.Id From Account

 

4.png


In production, it is:
https://www.zuora.com/apps/api/describe/Account?format=html&context=export
https://www.zuora.com/apps/api/describe/Contact?format=html&context=export

So, next time, you can simply refer to the above description doc to build your ZOQL Export query.

Supporting References:
https://knowledgecenter.zuora.com/DC_Developers/SOAP_API/M_Zuora_Object_Query_Language/Export_ZOQL






If you found my answer helpful, please give me a kudo ↑
Help others find answers faster by accepting my post as a solution √