Salesforce Marketing Cloud — Easy Data Integration — part 1

One of the most convenient methods to connect to an external database or access cloud data from Python is via ODBC. Devart has developed a range of ODBC Drivers for Python to work with databases and cloud services.

--

If you don’t have Python installed on your machine, go to the Python official website, download the appropriate installer and run it. You will also need to install the pyodbc module — the easiest way to do that is by using the pip install pyodbc command in the Python interactive mode. Next, you need to download the ODBC Driver for Salesforce MC. To use the ODBC driver as a translation layer between the application and the database, you need to configure it by following the installation instructions.

Connecting to Salesforce MC from Python using ODBC Driver for Salesforce MC

Here’s an example to show you how to connect to Salesforce MC via Devart ODBC Driver in Python. First we import the pyodbc module, then create a connection to the database, insert a new row and read the contents of the EMP table while printing each row to the Python interactive console. To execute the script, you can type the code directly in the interactive console or add the code to a file with the .py extension and run the file from the command prompt.

That’s it, I hope your reading has been helpful.

Tks,

https://www.linkedin.com/in/brunoluizmendes/

Sign up to discover human stories that deepen your understanding of the world.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

No responses yet

Write a response