Extract, Transform, and Load Raisers Edge NXT Data in Python

Ready to get started?

Download for a free trial:

Download Now

Learn more:

Raisers Edge NXT Python Connector

Python Connector Libraries for Raisers Edge NXT Data Connectivity. Integrate Raisers Edge NXT with popular Python tools like Pandas, SQLAlchemy, Dash & petl.



The CData Python Connector for Raisers Edge NXT enables you to create ETL applications and pipelines for Raisers Edge NXT data in Python with petl.

The rich ecosystem of Python modules lets you get to work quickly and integrate your systems more effectively. With the CData Python Connector for Raisers Edge NXT and the petl framework, you can build Raisers Edge NXT-connected applications and pipelines for extracting, transforming, and loading Raisers Edge NXT data. This article shows how to connect to Raisers Edge NXT with the CData Python Connector and use petl and pandas to extract, transform, and load Raisers Edge NXT data.

With built-in, optimized data processing, the CData Python Connector offers unmatched performance for interacting with live Raisers Edge NXT data in Python. When you issue complex SQL queries from Raisers Edge NXT, the driver pushes supported SQL operations, like filters and aggregations, directly to Raisers Edge NXT and utilizes the embedded SQL engine to process unsupported operations client-side (often SQL functions and JOIN operations).

Connecting to Raisers Edge NXT Data

Connecting to Raisers Edge NXT data looks just like connecting to any relational data source. Create a connection string using the required connection properties. For this article, you will pass the connection string as a parameter to the create_engine function.

Before establishing a connection, supply the SubscriptionKey, found in the Blackbaud Raiser's Edge NXT Profile.

Authenticating to Raiser's Edge NXT

Blackbaud Raiser's Edge NXT uses the OAuth authentication standard. You can connect to without setting any connection properties using the embedded OAuth credentials.

Alternatively, you can authenticate by creating a custom app to obtain the OAuthClientId, OAuthClientSecret, and CallbackURL connection properties.

See the Help documentation for an authentication guide.

After installing the CData Raisers Edge NXT Connector, follow the procedure below to install the other required modules and start accessing Raisers Edge NXT through Python objects.

Install Required Modules

Use the pip utility to install the required modules and frameworks:

pip install petl
pip install pandas

Build an ETL App for Raisers Edge NXT Data in Python

Once the required modules and frameworks are installed, we are ready to build our ETL app. Code snippets follow, but the full source code is available at the end of the article.

First, be sure to import the modules (including the CData Connector) with the following:

import petl as etl
import pandas as pd
import cdata.raiseredgenxt as mod

You can now connect with a connection string. Use the connect function for the CData Raisers Edge NXT Connector to create a connection for working with Raisers Edge NXT data.

cnxn = mod.connect("SubscriptionKey=MySubscriptionKey;OAuthClientId=MyOAuthClientId;OAuthClientSecret=MyOAuthClientSecret;CallbackURL=http://localhost:33333;InitiateOAuth=GETANDREFRESH;OAuthSettingsLocation=/PATH/TO/OAuthSettings.txt")")

Create a SQL Statement to Query Raisers Edge NXT

Use SQL to create a statement for querying Raisers Edge NXT. In this article, we read data from the Constituents entity.

sql = "SELECT Id, AddressLines FROM Constituents WHERE Type = 'Home'"

Extract, Transform, and Load the Raisers Edge NXT Data

With the query results stored in a DataFrame, we can use petl to extract, transform, and load the Raisers Edge NXT data. In this example, we extract Raisers Edge NXT data, sort the data by the AddressLines column, and load the data into a CSV file.

Loading Raisers Edge NXT Data into a CSV File

table1 = etl.fromdb(cnxn,sql)

table2 = etl.sort(table1,'AddressLines')

etl.tocsv(table2,'constituents_data.csv')

With the CData Python Connector for Raisers Edge NXT, you can work with Raisers Edge NXT data just like you would with any database, including direct access to data in ETL packages like petl.

Free Trial & More Information

Download a free, 30-day trial of the Raisers Edge NXT Python Connector to start building Python apps and scripts with connectivity to Raisers Edge NXT data. Reach out to our Support Team if you have any questions.



Full Source Code


import petl as etl
import pandas as pd
import cdata.raiseredgenxt as mod

cnxn = mod.connect("SubscriptionKey=MySubscriptionKey;OAuthClientId=MyOAuthClientId;OAuthClientSecret=MyOAuthClientSecret;CallbackURL=http://localhost:33333;InitiateOAuth=GETANDREFRESH;OAuthSettingsLocation=/PATH/TO/OAuthSettings.txt")")

sql = "SELECT Id, AddressLines FROM Constituents WHERE Type = 'Home'"

table1 = etl.fromdb(cnxn,sql)

table2 = etl.sort(table1,'AddressLines')

etl.tocsv(table2,'constituents_data.csv')