question

MogensSgaard-1353 avatar image
0 Votes"
MogensSgaard-1353 asked MartinJaffer-MSFT commented

in Azure Data factory, I´m Unable to reference a Salesforce report, when using SalesForce connector and "Copy Data" tool

according to https://docs.microsoft.com/en-us/azure/data-factory/connector-salesforce#query-tips, you should be able to reference a Salesforce report:

You can retrieve data from Salesforce reports by specifying a query as {call "<report name>"}. An example is "query": "{call \"TestReport\"}"

However I´m not able to hit the correct terminalogy, I keep getting error below when I preview the data:
ERROR [HY000] [Microsoft][Salesforce] (120) SOQL_FIRST mode prepare failure: SOQL error: [Microsoft][SQLEngine] (31480) syntax error near '"<<< ??? >>>query": "{call \"SQLOpportunities\"}" '. SQL error: [Microsoft][SQLEngine] (31480) syntax error near '"query"<<< ??? >>>: "{call \"SQLOpportunities\"}" '. . Activity ID: a8eabad6-8a3a-4920-8107-bf962621e7a9

I´m going nuts, any help would be hugely appreciated
BR
Mogens

azure-data-factory
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

MartinJaffer-MSFT avatar image
0 Votes"
MartinJaffer-MSFT answered MartinJaffer-MSFT commented

Hello @MogensSgaard-1353 and welcome to Microsoft Q&A.

 "query"<<< ??? >>>: "{call \"SQLOpportunities\"}"

What is the <<< ??? >>> part?

When looking at pipeline json, the example looks like

  "typeProperties": {
                     "source": {
                         "type": "SalesforceSource",
                         "query": "{call \"TestReport\"}",
                         "readBehavior": "query"
                     },

When looking at the UI, the example looks like

 {call "TestReport"}






· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi Martin

Yeeehaa, that absolutely works. Seems like the like last combination I didn´t try, doh.
So "query": "{call \"TestReport\"} is based on JSON, where I´m using the UI, I got it...

Thanks a bunch again!

Btw: <<< ??? >>> is a part of the error description, not something I put in

br
Mogens

0 Votes 0 ·

Ahh, so everything is working now, @MogensSgaard-1353 ?

I'll convert from comment to answer type post, and you can mark as accepted answer if that was all you needed.

Yeah, the documentation often doesn't include the UI pictures because the interface changes more often than the JSON definition backing them up. One way to tell is by how many \` there are. Since the definitions are in JSON, any values entered in the UI get escaped ("` -> \") .

1 Vote 1 ·