US and Worldwide: +1 (866) 660-7555
Results 1 to 8 of 8

Thread: Salesforce.com input step with relationship query

  1. #1
    Join Date
    Oct 2006
    Posts
    2

    Post Salesforce.com input step with relationship query

    Trying to run a relationship query using the sfdc input step. The SOQL is:

    select lead.id, lead.firstname, lead.lastname,
    status, campaignId from campaignMember
    where leadId !='' and campaignId ='[some campaign id]'

    The query as such works fine when firing it to SFDC manually - however: the input step only recognizes the fields that reside in CampaignMember, not the ones that I want to pull from the Lead object (the field list actually just shows 'Lead' as one field, not its the individual properties).

    I am sure I am overlooking something here ... anybody able to help?

    Thanks!

    Rupert

  2. #2
    Join Date
    Sep 2010
    Posts
    4

    Default

    I am having the same issue doing SOQL queries across multiple Salesforce objects.
    SOQL employs a dot-notation for joining objects in queries.
    SELECT Contact.FirstName, Contact.Account.Name from Contact

    However, the Salesforce Input step does not seem to support SOQL queries across multiple objects. Any suggestions?

  3. #3

    Default Is there any solution?

    I am having the same issue. Does anyone has the solution?

    Thanks,
    Vinayak

  4. #4
    Join Date
    May 2010
    Posts
    2

    Default

    I posted a similar request in April. Has anyone found a solution?

    If not, it seems the only way to go about it is to use multiple Salesforce Input steps and join within the transformation itself.

  5. #5
    Join Date
    Sep 2012
    Posts
    16

    Default

    Don't suppose anyone found a solution to this yet?

  6. #6
    Join Date
    Feb 2008
    Posts
    4

    Default

    You can use the web services lookup with the relationship query and then parse the response XML as you want. Here is the Query and response that I was able to get through lookup step:
    query: Select id,Account.Name from Opportunity
    Response trace:

    <soapenv:Body>
    2013/01/28 12:29:03 - Web services lookup.0 - <queryAllResponse>
    2013/01/28 12:29:03 - Web services lookup.0 - <result xsi:type="QueryResult">
    2013/01/28 12:29:03 - Web services lookup.0 - <done>true</done>
    2013/01/28 12:29:03 - Web services lookup.0 - <queryLocator xsi:nil="true"/>
    2013/01/28 12:29:03 - Web services lookup.0 - <records xsi:type="sf:sObject">
    2013/01/28 12:29:03 - Web services lookup.0 - <sf:type>Opportunity</sf:type>
    2013/01/28 12:29:03 - Web services lookup.0 - <sf:Id>00690000006VxCbAAK</sf:Id>
    2013/01/28 12:29:03 - Web services lookup.0 - <sf:Id>00690000006VxCbAAK</sf:Id>
    2013/01/28 12:29:03 - Web services lookup.0 - <sf:Account xsi:type="sf:sObject">
    2013/01/28 12:29:03 - Web services lookup.0 - <sf:type>Account</sf:type>
    2013/01/28 12:29:03 - Web services lookup.0 - <sf:Id xsi:nil="true"/>
    2013/01/28 12:29:03 - Web services lookup.0 - <sf:Name>GoodData</sf:Name>
    2013/01/28 12:29:03 - Web services lookup.0 - </sf:Account>
    2013/01/28 12:29:03 - Web services lookup.0 - </records>

    I created a Job and added two transformations, one for login and other with queryAll

  7. #7
    Join Date
    Sep 2012
    Posts
    3

    Default Possible patch

    I've created this patch for http://jira.pentaho.com/browse/PDI-9599 which may resolve this issue. It works for child-to-parent relationships in soql but not for parent-to-child relationships. Parent-to-child relationships we would need to inject extra records record while parsing the child records. See http://help.salesforce.com/apex/HTVi...language=en_US for details.
    Attached Files Attached Files

  8. #8
    Join Date
    Sep 2012
    Posts
    3

    Default

    The attached code fixes the child-to-parent relationship described in http://help.salesforce.com/apex/HTVi...language=en_US but to implement the parent-to-child relationship we would need to inject new records while parsing the child query. This would be a major change to the existing code.
    Attached Files Attached Files

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •