CData Python Connector for SAP Gateway

Build 23.0.8839

接続

Dialect URL での接続

SQLAlchemy を使用して接続を確立するには、特定のURL 形式が必要です。 このコネクタでは、次のURL 形式のいずれかを使用してエンジンを作成できます。

形式1


from sqlalchemy import create_engine
engine = create_engine("sapgateway:///?InitiateOAuth=GETANDREFRESH;User=user;Password=password;URL=https://sapes5.sapdevcenter.com/sap/opu/odata/IWBEP/GWSAMPLE_BASIC/")

形式2


from sqlalchemy import create_engine
engine = create_engine("sapgateway://User:Password@/?URL=https://sapes5.sapdevcenter.com/sap/opu/odata/IWBEP/GWSAMPLE_BASIC/;")

SQLAlchemy 2.0 では、方言名はsapgateway_2 です。接続を確立するには、以下のURL 形式を使用します。

from sqlalchemy import create_engine
engine = create_engine("quickbooks_2:///?User=test;Password=test;URL=http://localhost:8166;")

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