0

With the new OAUTH2 LinkedService connection established we ran into the following issue in our pipelines.

When performing the following query through Azure Data Factory:

SELECT Id FROM Account WHERE SystemModstamp > @{variables('Lastmodified Account')} OR LastModifiedDate > @{variables('Lastmodified Account')} 

We receive the following error.

The response from Salesforce Bulk API indicates a failure. Please check the error message to understand the reason or contact Salesforce support. Error message: {"id":"750aV00000BJOgGQAX","operation":"queryAll","object":"Account","createdById":"00509000009qvimAAA","createdDate":"2024-11-11T13:36:55.000+0000","systemModstamp":"2024-11-11T13:36:56.000+0000","state":4,"concurrencyMode":"Parallel","contentType":"CSV","apiVersion":"54.0","lineEnding":"LF","columnDelimiter":"COMMA","jobType":"V2Query","numberRecordsProcessed":0,"retries":0,"totalProcessingTime":0,"numberRecordsFailed":0,"errorMessage":"Unexpected exception encountered in query processing. Please contact support with the following id: (removed)

We tried writing the correct datetime format instead of variables which returns the same unhandled exception, at the end of my latin here.

I've also seen a similar thread that got resolved using parenthesis outside of the where clausule, this in my case did not resolve the issue.

Thanks in advance for any help.

2
  • Where it says "(removed)" was it you who removed the id, or did you copy that also? Commented Nov 11, 2024 at 14:38
  • I removed the support id myself for the purpose of this topic. Commented Nov 11, 2024 at 14:44

1 Answer 1

2

So for anyone curious, after doing some more digging, using parenthesis worked, as well as having the correct date/time format as default variable value.

Issue

Default value for variable: 2020-01-01

SELECT Id FROM Account WHERE SystemModstamp > @{variables('Lastmodified Account')} OR LastModifiedDate > @{variables('Lastmodified Account')} 

Solution

New default value for variable: 2020-01-01T00:00:00Z

SELECT Id FROM Account WHERE (SystemModstamp > @{variables('Lastmodified Account')} OR LastModifiedDate > @{variables('Lastmodified Account')}) 

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.