CData Python Connector for SAP HANA XSA

Build 24.0.9060

Establishing a Connection

The objects available within our connector are accessible from the "cdata.saphanaxsa" module. To use the module's objects directly:

  1. Import the module as follows:
    import cdata.saphanaxsa as mod
  2. To establish a connection string, call the connect() method from the connector object using an appropriate connection string, such as:
    mod.connect("User=MyUser;Password=MyPassword;URL=https://hxehost:51027/euro.xsodata;")

SAP HANA XSA uses the OAuth authentication standard. Before connecting, it is necessary to establish an SAP HANA XSA OData Service. See Creating a Custom OAuth App for a guide.

To connect to SAP HANA XSA using the OAuthPassword Grant type set the following:

  • OAuthClientId: Set this to the Client Id specified in the UAA service JSON file.
  • OAuthClientSecret: Set this to the Client Secret specified in the UAA service JSON file.
  • Url: Set this to the OData service endpoint.
  • XSUAAURL: Set this to the UAA service url.
  • User: Set your accounts username.
  • Password: Set your accounts password

Once you've configured the OData Service, you can establish a connection using Custom Credentials.

Copyright (c) 2024 CData Software, Inc. - All rights reserved.
Build 24.0.9060