You can translate the question and the replies:

Salesforce data source - get deleted records with queryAll methods

Hello, we're using denodo 5.5. with the latest version of salesforce rest wrapper. Is there a support for 'query all rows' option (queryAll method) in the denodo-salesforce connector? This is required in order to be able to capture deleted records in salesforce.
user
19-01-2016 02:51:15 -0500
code

6 Answers

Hi, As you said, the "query all rows" option is provided by the resource "queryAll" available in the REST API. The salesforce-rest-customwrapper includes two different wrappers, "SOQL Wrapper" and "Predefined SOQL Wrapper", to execute SOQL queries from VDP. They are both implemented using the resource "query" from the Salesforce REST API. Nevertheless, you can create a JSON data source using the Salesforce REST API to be able to execute SOQL queries with the queryAll resource. To do that, follow these steps: 1. Create a JSON data source. 2. Set the Data route as "HTTP Client". 3. Set the URL as "https://na2.salesforce.com/services/data/v30.0/queryAll?q=@query" 4. Set your Salesforce credentials and tokens in the Authentication tab. Find more information here: https://community.denodo.com/kb/view/document/Custom%20Elements/OAuth%20authentication%20using%20the%20Salesforce%20REST%20Custom%20Wrapper 5. Click "ok" and create a base view. Hope this helps!
Denodo Team
19-01-2016 06:42:36 -0500
code
thank you for the quick answer, this sounds promising. However I can't connect with this approach. Which HTTP method should be used (GET or POST) ? I'm trying to use access token, client id an refresh token which are used for connecting via rest salesforce wrapper (and eu2.salesforce.com instead of na2.salesforce.com). Which fields need to be set on the Authentication tab of the json wrapper ? which one is the correct setting in the 'Authentication method use by the authorization servers' and 'request signing method' ? Regards
user
19-01-2016 10:16:33 -0500
Hi, I recommend to create a new access and refresh token using the wizard as explained in the Knowledge base article mentioned above (https://community.denodo.com/kb/view/document/Custom%20Elements/OAuth%20authentication%20using%20the%20Salesforce%20REST%20Custom%20Wrapper ) so you only need the client identifier and client secret values. Regarding your questions: - Use "GET" as HTTP method. - Select the following options in the "Authentication tab" 1. "Oauth 2.0" as Authentication method. 2. The default values for the fields 'Authentication method use by the authorization servers' and 'request signing method' are valid. 3. Once the authorization wizard is open, Use these URLs: Authorization server URL: https://login.salesforce.com/services/oauth2/authorize Token endpoint URL: https://login.salesforce.com/services/oauth2/token Regards
Denodo Team
19-01-2016 11:24:30 -0500
code
works perfectly now, thanks!
user
20-01-2016 04:48:57 -0500
Hi, it seems that the session expires and the connection is working the day it's generated but the next day it says session expired or invalid: Message returned by the server: [{"message":"Session expired or invalid","errorCode":"INVALID_SESSION_ID"}] So we used the follwing as URL on the connector: https://eu2.salesforce.com/services/data/v30.0/queryAll?q=@query Then on authentication tab: oAuth2.0 is selected, client identifier and client secret are provided and access token and refresh token as well. Token endpoint url is https://login.salesforce.com/services/oauth2/token When generating a token we used this redirect URI: http://localhost:9090/oauth/2.0/redirectURL.jsp Any ideas what might be wrong ?
user
22-01-2016 01:57:39 -0500
Hi, It seems a problem in your Salesforce configuration. The error can be caused by two different configuration issues. 1. If there is not refresh token, you should review the scopes of your Salesforce application. Probably you need to assign more options. You can modify that on your Salesforce, clicking on "Edit" on your application and modifying the "Selected OAuth Scopes" values. 2. If there is a refresh token, you should review the "Refresh Token Policy" of your application. It could be configured to expire immediately or after a number of days so your token is expired when executing the query. You can modify that on your Salesforce, clicking on "Manage" on your application and modifying the "Refresh Token Policy" value. Hope this helps!
Denodo Team
27-01-2016 04:01:47 -0500
code
You must sign in to add an answer. If you do not have an account, you can register here