![]() |
VOOZH | about |
The CData ADO.NET Provider for Anaplan is a standard ADO.NET Provider that make it easy to accomplish data cleansing, normalization, backup, and other integration tasks by enabling real-time access to Anaplan.
The ADO.NET Provider provides a SQL interface for Anaplan; this tutorial shows how to use the Provider to retrieve Anaplan data.
Once you have acquired the necessary connection properties, accessing Anaplan data in PowerShell can be enabled in three steps.
The driver supports authenticating with Basic, Certificate, or OAuth. In every case, set Region to the region where your Anaplan account data is hosted (e.g., , which is the default).
Set AuthScheme to , then supply your Anaplan User and Password. If your workspace uses single sign-on (SSO), you must be assigned as an Exception User to use Basic authentication.
Set AuthScheme to , then supply the Certificate, CertificateType, and PrivateKey properties (and the matching CertificatePassword / PrivateKeyPassword if either is encrypted). The certificate must be a CA-issued X.509 certificate registered with your Anaplan tenant administrator.
Register a custom OAuth application in Anaplan, then set the following properties:
See the Getting Started chapter of the help documentation for a guide to creating a custom OAuth app and using OAuth.
Load the provider's assembly:
[Reflection.Assembly]::LoadFile("C:\Program Files\CData\CData ADO.NET Provider for Anaplan\lib\System.Data.CData.Anaplan.dll")
Connect to Anaplan:
$conn= New-Object System.Data.CData.Anaplan.AnaplanConnection("OAuthClientId=your_client_id;OAuthClientSecret=your_client_secret;CallbackURL=your_callback_url;Region=US1;InitiateOAuth=GETANDREFRESH;")
$conn.Open()
Instantiate the AnaplanDataAdapter, execute an SQL query, and output the results:
$sql="SELECT Region, Product from Sales"
$da= New-Object System.Data.CData.Anaplan.AnaplanDataAdapter($sql, $conn)
$dt= New-Object System.Data.DataTable
$da.Fill($dt)
$dt.Rows | foreach {
Write-Host $_.region $_.product
}
Download a free trial of the Anaplan Data Provider to get started:
Download NowLearn more:
👁 Anaplan IconRapidly create and deploy powerful .NET applications that integrate with Anaplan.