이 페이지에서는 Cloud Data Fusion에서 Salesforce 소스를 사용할 때 SOQL 관계 쿼리를 사용하는 방법을 보여줍니다.
Salesforce 소스를 사용하면 Salesforce에 원활하게 연결하고 대량의 데이터를 Google Cloud에 로드할 수 있습니다. 데이터 로드를 간소화하려면 SOQL 관계 쿼리를 사용하여 레코드를 검색하고 Salesforce에서 API 호출 수를 줄일 수 있습니다.
시작하기 전에
Cloud Data Fusion에서 Salesforce 소스의 속성을 배포하고 구성합니다. 자세한 내용은 Salesforce 일괄 소스를 참조하세요.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-09-04(UTC)"],[[["\u003cp\u003eThis page demonstrates how to use SOQL relationship queries with the Salesforce source in Cloud Data Fusion to efficiently load large amounts of data into Google Cloud.\u003c/p\u003e\n"],["\u003cp\u003eSOQL relationship queries can help reduce the number of API calls needed to retrieve records from Salesforce, simplifying the data loading process.\u003c/p\u003e\n"],["\u003cp\u003eThe page provides examples of relationship queries with a polymorphic key and limits, child-to-parent relationships with custom objects, and WHERE and OFFSET clauses for managing large result sets.\u003c/p\u003e\n"],["\u003cp\u003eReference object fields in the Salesforce plugin are case-sensitive, unlike other fields, a point to keep in mind when creating queries.\u003c/p\u003e\n"],["\u003cp\u003eUsing OFFSET clauses allows for the management of large datasets by returning results in multiple pages, improving the efficiency of handling vast quantities of data.\u003c/p\u003e\n"]]],[],null,["# Use case: SOQL queries for the Salesforce source\n\nThis page shows how to use SOQL relationship queries when you use the Salesforce\nsource in Cloud Data Fusion.\n\nThe Salesforce source lets you seamlessly connect to Salesforce and load large\namounts of data into Google Cloud. To simplify loading the data, you can use\n[SOQL relationship queries](http://www.salesforce.com/us/developer/docs/dbcom_soql_sosl/Content/sforce_api_calls_soql_relationships.htm)\nto retrieve records and reduce the number of API calls in Salesforce.\n\nBefore you begin\n----------------\n\n1. Deploy and configure the properties for the Salesforce source in\n Cloud Data Fusion. For more information, see\n [Salesforce batch source](/data-fusion/docs/how-to/configure-salesforce-batch-source#confirgure).\n\n2. On the **Salesforce** node in your pipeline, click\n **Properties**. This opens the Salesforce plugin properties page.\n\nThe following sections describe how to configure the **SOQL query** field on the\n**Properties** page.\n\nScenario 1: Relationship query with polymorphic key and limits\n--------------------------------------------------------------\n\nThe following relationship query example has a polymorphic key and a limit: \n\n SELECT Id, Owner.Name FROM Task WHERE Owner.FirstName like 'B%' Limit 100\n\nThis query fetches data from a `Task` SObject related to `Owner`. It reads data\nfrom the selected fields in the `Task` SObject. It has a `WHERE` clause and\na placeholder, which you can assign a suitable value.\n\nThis query lets you access the required fields using a placeholder variable. It\nlimits the quantity of records fetched to `100`.\n\nScenario 2: Relationship query with child-to-parent with custom objects\n-----------------------------------------------------------------------\n\nThe following query fetches data from a custom object with child-to-parent\nrelationship: \n\n SELECT Email,newsales__c,Account__r.OwnerId FROM lead WHERE Account__r.Lead Source LIKE 'C%\n\nThis query uses a `SELECT` clause to fetch data from the `Lead` SObject in\nSalesforce with the reference field, `Account__r.OwnerId`.\n\nThe query returns data from the selected fields in the `Lead` SObject and the\nrelational fields from the lookup linked to the `Account` parent object. You can\nquery multiple data fields from a cluster of relational SObjects.\n| **Note:** In the Salesforce plugin, reference object fields are case sensitive, where the other fields aren't.\n\n### Scenario 3: Relationship query with WHERE and OFFSET clauses\n\nThe following query fetches data from multiple SObjects: `Account` and\n`Contacts`, related to a specific `Industry` type and `OFFSET` clause: \n\n SELECT Name, (SELECT LastName FROM Contacts WHERE CreatedBy.Alias = 'x') FROM Account WHERE Industry = 'media'\n offset 4\n\nThe `OFFSET` clause lets you to return results on multiple pages, which is an\nefficient way to handle large results sets.\n\nWhat's next\n-----------\n\n- Configure the [Salesforce batch source](/data-fusion/docs/how-to/configure-salesforce-batch-source#properties) in Cloud Data Fusion.\n- Work through a [Salesforce plugin tutorial](/data-fusion/docs/tutorials/connect-salesforce-to-bq)."]]