<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Salesforce connection with Databricks in Machine Learning</title>
    <link>https://community.databricks.com/t5/machine-learning/salesforce-connection-with-databricks/m-p/59053#M2939</link>
    <description>&lt;P&gt;I am planning to use it as a two way sync, reading data from salesforce as well as writing data into salesforce&lt;/P&gt;</description>
    <pubDate>Fri, 02 Feb 2024 12:25:59 GMT</pubDate>
    <dc:creator>NDK_1</dc:creator>
    <dc:date>2024-02-02T12:25:59Z</dc:date>
    <item>
      <title>Salesforce connection with Databricks</title>
      <link>https://community.databricks.com/t5/machine-learning/salesforce-connection-with-databricks/m-p/58748#M2921</link>
      <description>&lt;P&gt;How can we connect with salesforce from databricks without using any third party jar files?&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jan 2024 20:55:20 GMT</pubDate>
      <guid>https://community.databricks.com/t5/machine-learning/salesforce-connection-with-databricks/m-p/58748#M2921</guid>
      <dc:creator>NDK_1</dc:creator>
      <dc:date>2024-01-30T20:55:20Z</dc:date>
    </item>
    <item>
      <title>Re: Salesforce connection with Databricks</title>
      <link>https://community.databricks.com/t5/machine-learning/salesforce-connection-with-databricks/m-p/58843#M2923</link>
      <description>&lt;P&gt;you could connect to the salesforce database directly using odbc/jdbc, if that is permitted.&lt;BR /&gt;But why not using an ETL tool to extract data, and use databricks for the processing?&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jan 2024 14:06:51 GMT</pubDate>
      <guid>https://community.databricks.com/t5/machine-learning/salesforce-connection-with-databricks/m-p/58843#M2923</guid>
      <dc:creator>-werners-</dc:creator>
      <dc:date>2024-01-31T14:06:51Z</dc:date>
    </item>
    <item>
      <title>Re: Salesforce connection with Databricks</title>
      <link>https://community.databricks.com/t5/machine-learning/salesforce-connection-with-databricks/m-p/58849#M2924</link>
      <description>&lt;P&gt;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/99044"&gt;@NDK_1&lt;/a&gt;&amp;nbsp;: are you looking to keep it in sync with your salesforce periodically or two way sync ? Would love to understand the usecase more.&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jan 2024 14:50:06 GMT</pubDate>
      <guid>https://community.databricks.com/t5/machine-learning/salesforce-connection-with-databricks/m-p/58849#M2924</guid>
      <dc:creator>rnavi</dc:creator>
      <dc:date>2024-01-31T14:50:06Z</dc:date>
    </item>
    <item>
      <title>Re: Salesforce connection with Databricks</title>
      <link>https://community.databricks.com/t5/machine-learning/salesforce-connection-with-databricks/m-p/59053#M2939</link>
      <description>&lt;P&gt;I am planning to use it as a two way sync, reading data from salesforce as well as writing data into salesforce&lt;/P&gt;</description>
      <pubDate>Fri, 02 Feb 2024 12:25:59 GMT</pubDate>
      <guid>https://community.databricks.com/t5/machine-learning/salesforce-connection-with-databricks/m-p/59053#M2939</guid>
      <dc:creator>NDK_1</dc:creator>
      <dc:date>2024-02-02T12:25:59Z</dc:date>
    </item>
    <item>
      <title>Re: Salesforce connection with Databricks</title>
      <link>https://community.databricks.com/t5/machine-learning/salesforce-connection-with-databricks/m-p/59054#M2940</link>
      <description>&lt;P&gt;Not able to connect from odbc/jdbc. Now using azure logic apps to extract data from salesforce&lt;/P&gt;</description>
      <pubDate>Fri, 02 Feb 2024 12:28:50 GMT</pubDate>
      <guid>https://community.databricks.com/t5/machine-learning/salesforce-connection-with-databricks/m-p/59054#M2940</guid>
      <dc:creator>NDK_1</dc:creator>
      <dc:date>2024-02-02T12:28:50Z</dc:date>
    </item>
    <item>
      <title>Re: Salesforce connection with Databricks</title>
      <link>https://community.databricks.com/t5/machine-learning/salesforce-connection-with-databricks/m-p/59409#M2962</link>
      <description>&lt;P&gt;if you want to write to salesforce, it is probably a good idea to check the requirements.&lt;BR /&gt;Many of those huge software packages do not allow direct writes into the database.&amp;nbsp; So you might need a licensed connector or something.&lt;BR /&gt;If you want to keep it in sync, I am leaning towards using an ETL tool.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Feb 2024 08:50:54 GMT</pubDate>
      <guid>https://community.databricks.com/t5/machine-learning/salesforce-connection-with-databricks/m-p/59409#M2962</guid>
      <dc:creator>-werners-</dc:creator>
      <dc:date>2024-02-06T08:50:54Z</dc:date>
    </item>
    <item>
      <title>Re: Salesforce connection with Databricks</title>
      <link>https://community.databricks.com/t5/machine-learning/salesforce-connection-with-databricks/m-p/108860#M3947</link>
      <description>&lt;P&gt;You can connect to Salesforce from Databricks without using third-party JAR files by leveraging &lt;STRONG&gt;Python and the Salesforce REST API&lt;/STRONG&gt; using the simple-salesforce library. Since simple-salesforce is a Python package, you can install it within your Databricks notebook and interact with Salesforce directly.&lt;/P&gt;&lt;H3&gt;&lt;STRONG&gt;Steps to Connect Databricks to Salesforce via REST API&lt;/STRONG&gt;&lt;/H3&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Install the simple-salesforce library&lt;/STRONG&gt; in Databricks:&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;python&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;%pip install simple-salesforce &lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Authenticate and Connect to Salesforce&lt;/STRONG&gt;:&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;python&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;from&lt;/SPAN&gt; simple_salesforce &lt;SPAN class=""&gt;import&lt;/SPAN&gt; Salesforce &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;# Salesforce Credentials&lt;/SPAN&gt; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;username = &lt;SPAN class=""&gt;'your_username'&lt;/SPAN&gt; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;password = &lt;SPAN class=""&gt;'your_password'&lt;/SPAN&gt; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;security_token = &lt;SPAN class=""&gt;'your_security_token'&lt;/SPAN&gt; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;# Authenticate&lt;/SPAN&gt; sf = Salesforce(username=username, password=password, security_token=security_token) &lt;SPAN class=""&gt;print&lt;/SPAN&gt;(sf) &lt;SPAN class=""&gt;# If successful, this will print a Salesforce object&lt;/SPAN&gt; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Read Data from Salesforce&lt;/STRONG&gt;:&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;python&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;query_result = sf.query(&lt;SPAN class=""&gt;"SELECT Id, Name FROM Account LIMIT 10"&lt;/SPAN&gt;) &lt;SPAN class=""&gt;print&lt;/SPAN&gt;(query_result[&lt;SPAN class=""&gt;'records'&lt;/SPAN&gt;]) &lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Write Data to Salesforce&lt;/STRONG&gt;:&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;python&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;new_account = sf.Account.create({&lt;SPAN class=""&gt;'Name'&lt;/SPAN&gt;: &lt;SPAN class=""&gt;'New Databricks Account'&lt;/SPAN&gt;}) &lt;SPAN class=""&gt;print&lt;/SPAN&gt;(new_account) &lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;H3&gt;&amp;nbsp;&lt;/H3&gt;&lt;H3&gt;&lt;STRONG&gt;Handling Two-Way Sync&lt;/STRONG&gt;&lt;/H3&gt;&lt;P&gt;Since you're looking for a &lt;STRONG&gt;two-way sync&lt;/STRONG&gt; (reading and writing data), here’s how you can:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt;Read from Salesforce:&lt;/STRONG&gt; Use sf.query() or sf.query_all() to fetch records.&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;Write to Salesforce:&lt;/STRONG&gt; Use create(), update(), or delete() methods based on the operation.&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;Automate Syncing:&lt;/STRONG&gt; Use Databricks Jobs to run these scripts at scheduled intervals.&lt;/LI&gt;&lt;/UL&gt;&lt;H3&gt;&amp;nbsp;&lt;/H3&gt;&lt;H3&gt;&lt;STRONG&gt;Alternatives&lt;/STRONG&gt;&lt;/H3&gt;&lt;UL&gt;&lt;LI&gt;If you’re using &lt;STRONG&gt;OAuth&lt;/STRONG&gt; for authentication, you can obtain an access token and use REST API calls using requests instead.&lt;/LI&gt;&lt;LI&gt;If you want to &lt;STRONG&gt;ingest bulk data&lt;/STRONG&gt;, you can use Salesforce's &lt;STRONG&gt;Bulk API&lt;/STRONG&gt; (also accessible via simple-salesforce).&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Tue, 04 Feb 2025 23:45:22 GMT</pubDate>
      <guid>https://community.databricks.com/t5/machine-learning/salesforce-connection-with-databricks/m-p/108860#M3947</guid>
      <dc:creator>emillion25</dc:creator>
      <dc:date>2025-02-04T23:45:22Z</dc:date>
    </item>
  </channel>
</rss>

