![]() |
VOOZH | about |
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 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.
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.
Use the pip utility to install the required modules and frameworks:
pip install petl pip install pandas
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;")
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'"
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.
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.
Download a free, 30-day trial of the CData Python Connector for Raisers Edge NXT 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.
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;")
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')
Download a Community License of the Raisers Edge NXT Connector to get started:
Download NowLearn more:
👁 Raisers Edge NXT IconPython Connector Libraries for Raisers Edge NXT Data Connectivity. Integrate Raisers Edge NXT with popular Python tools like Pandas, SQLAlchemy, Dash & petl.