SELECT Id FROM Contact WHERE Name LIKE 'A%' AND MailingCity =
'California'
SObject 名稱
是
否
要讀取的 Salesforce 物件名稱。如果提供值,連接器會從 Salesforce 取得此物件的所有欄位,並產生 SOQL 查詢,例如 select FIELD_1, FIELD_2 from
${sObjectName}。如果提供 SOQL 查詢,系統會忽略這項設定。
Salesforce Bulk API 中也有一些不支援的 sObject。使用不支援的物件建立工作會導致下列錯誤:Entity is not supported by the Bulk
API。Einstein Analytics 使用大量資料 API 查詢資料,因此也不支援這些物件。 不使用 BULK API 的情況:當查詢長度將查詢傳送至 Salesforce 以接收批次資訊陣列時,系統不會使用 BULK API。如果查詢在限制範圍內,系統就會執行原始查詢。否則會切換至寬物件邏輯。舉例來說,它會產生 ID 查詢,只擷取 ID 的批次資訊,日後可用於透過 SOAP API 擷取資料。
[[["容易理解","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 (世界標準時間)。"],[[["\u003cp\u003eThis page outlines the process of loading data from Salesforce sObjects into Google Cloud using Cloud Data Fusion's Salesforce batch source plugin.\u003c/p\u003e\n"],["\u003cp\u003eThe plugin allows data retrieval through Salesforce Object Query Language (SOQL) and supports the use of incremental or range date filters for selecting specific data subsets.\u003c/p\u003e\n"],["\u003cp\u003eConfiguration of the plugin requires either setting up a new connection with Salesforce credentials or using a previously configured, reusable connection.\u003c/p\u003e\n"],["\u003cp\u003eUsers can load all columns from a specified sObject or apply filters such as 'Last modified after/before,' 'Duration,' and 'Offset' to narrow down the data pulled.\u003c/p\u003e\n"],["\u003cp\u003eThe Salesforce batch source plugin supports PK chunking for enhanced performance when querying large datasets, and provides data mapping information from Salesforce data types to CDAP schema data types.\u003c/p\u003e\n"]]],[],null,["# Salesforce batch source\n\nThis page describes how to load data from [Salesforce\nsObjects](https://trailhead.salesforce.com/content/learn/modules/apex_database/apex_database_sobjects) into Google Cloud\nwith Cloud Data Fusion. The Salesforce batch source plugin reads sObjects from\nSalesforce. The sObjects are the Salesforce tables that you plan to pull from.\nSome examples of sObjects include opportunities, contacts, accounts, leads, and\ncustom objects.\n\nThe Salesforce batch source plugin supports reading data with [Salesforce Object\nQuery Language (SOQL)](/data-fusion/docs/use-case/salesforce-soql-queries)\nqueries and incremental or range date filters.\n\nBefore you begin\n----------------\n\n- The Cloud Data Fusion Salesforce batch source uses the Salesforce Bulk API V1.\n- Set up Salesforce before deploying and using Cloud Data Fusion Salesforce plugin. For more information, see [Create a Salesforce connected app for Cloud Data Fusion](/data-fusion/docs/how-to/create-salesforce-app-for-plugin).\n\nConfigure the plugin\n--------------------\n\n1. [Go to the Cloud Data Fusion web interface](/data-fusion/docs/create-data-pipeline#navigate-web-interface) and click **Studio**.\n2. Check that **Data Pipeline - Batch** is selected (not **Realtime**).\n3. In the **Source** menu, click **Salesforce** . The Salesforce node appears in your pipeline. If you don't see the Salesforce source on the **Studio** page, [deploy the Salesforce plugins from the Cloud Data Fusion Hub](/data-fusion/docs/how-to/deploy-a-plugin).\n4. To configure the source, go to the Salesforce node and click **Properties**.\n5. Enter the following properties. For a complete list, see\n [Properties](#properties).\n\n 1. Enter a **Label** for the Salesforce node---for example, `Salesforce\n tables`.\n 2. Enter a **Reference name** for the Salesforce source for lineage---for example, `Salesforce tables`.\n 3. Enter the connection details. You can set up a new, one-time connection,\n or an existing, reusable connection.\n\n ### New connection\n\n\n To add a one-time connection to Salesforce, follow these steps:\n 1. Keep **Use connection** turned off.\n 2. In the **Connection** section, enter the following information\n from the Salesforce account in these fields:\n\n - **Username**\n - **Password**\n - **Security token**\n - **Consumer key**\n - **Consumer secret**\n\n To get the credentials from Salesforce, see\n [Get properties from Salesforce](/data-fusion/docs/how-to/create-salesforce-app-for-plugin#get-salesforce-information).\n\n ### Reusable connection\n\n\n To reuse an existing connection, follow these steps:\n 1. Turn on **Use connection**.\n 2. Click **Browse connections**.\n 3. Click the connection name.\n\n | **Note:** For more information about adding, importing, and editing the connections that appear when you browse connections, see [Manage connections](/data-fusion/docs/how-to/managing-connections).\n 4. Optional: If a connection doesn't exist and you want to create a\n new reusable connection, click **Add connection** and refer to the\n steps in the [**New connection**](#new-connection) tab.\n\n 4. Enter the **SObject name** to load all the columns from the object.\n\n 5. Optional: If you select the sObject name, you can filter the data with\n the following fields:\n\n - **Last modified after**: Only include records that were last modified after a given time.\n - **Last modified before**: Only include records that were last modified earlier than a given time.\n - **Duration**: Only include records that were last modified within a time window of the specified size.\n - **Offset**: Only include records where the Last modified date is less than the logical start time of the pipeline, minus the given offset.\n 6. Optional: For supported sObjects, to improve the performance of a\n pipeline, turn on **Enable PK chunking** . For more information, see\n [Improve performance with PK chunking](/data-fusion/docs/concepts/best-practice-salesforce#pk-chunking).\n\n 7. Optional: Instead of specifying the sObject Name, you can enter a SOQL\n query, such as `SELECT LastName from Contact`. For more information, see\n [SOQL queries for the Salesforce source](/data-fusion/docs/use-case/salesforce-soql-queries).\n\n 8. To test connectivity, click **Get schema**. Cloud Data Fusion\n connects to Salesforce and pulls the schema for the listed table\n (technically, an sObject).\n\n### Properties\n\n### Salesforce date format examples\n\n### Data type mappings\n\nThe following table is a list of Salesforce data types with corresponding\nCDAP types.\n\nUse cases\n---------\n\nSee the following use cases for the Salesforce batch source:\n\n- [Use the Salesforce batch source plugin to analyze leads data in BigQuery](/data-fusion/docs/tutorials/connect-salesforce-to-bq)\n\n- [Use SOQL queries for the Salesforce source](/use-case/salesforce-soql-queries)\n\nBest practices\n--------------\n\nFor more information about improving performance in the Salesforce batch source, see the [best practices](/data-fusion/docs/concepts/best-practice-salesforce). \n\nRelease notes\n-------------\n\n- [March 14, 2024](/data-fusion/docs/release-notes#March_14_2024)\n- [August 7, 2023](https://cdap.atlassian.net/wiki/spaces/DOCS/pages/1280901131/CDAP+Hub+Release+Log#August-7%2C-2023)\n- [August 4, 2023](https://cdap.atlassian.net/wiki/spaces/DOCS/pages/1280901131/CDAP+Hub+Release+Log#August-4%2C-2023)\n- [July 7, 2023](https://cdap.atlassian.net/wiki/spaces/DOCS/pages/1280901131/CDAP+Hub+Release+Log#July-7%2C-2023)\n- [June 7, 2023](https://cdap.atlassian.net/wiki/spaces/DOCS/pages/1280901131/CDAP+Hub+Release+Log#June-7%2C-2023)\n- [May 25, 2023](https://cdap.atlassian.net/wiki/spaces/DOCS/pages/1280901131/CDAP+Hub+Release+Log#May-25%2C-2023)\n- [April 13, 2023](https://cdap.atlassian.net/wiki/spaces/DOCS/pages/1280901131/CDAP+Hub+Release+Log#April-13%2C-2023)\n- [March 20, 2023](https://cdap.atlassian.net/wiki/spaces/DOCS/pages/1280901131/CDAP+Hub+Release+Log#March-20%2C-2023)\n\nWhat's next\n-----------\n\n- Work through a [Salesforce plugin tutorial](/data-fusion/docs/tutorials/connect-salesforce-to-bq)."]]