CData Python Connector for SAP Gateway

Build 23.0.8839

カラム

特定のテーブルで利用可能なカラムは、"sys_tablecolumns"と呼ばれるシステムテーブルからフェッチされます。 WHERE 条件で特定のテーブル名を指定すると、カラム情報をフェッチするテーブルを制限することができます。

import cdata.sapgateway as mod
conn = mod.connect("InitiateOAuth=GETANDREFRESH;User=user;Password=password;URL=https://sapes5.sapdevcenter.com/sap/opu/odata/IWBEP/GWSAMPLE_BASIC/")
cur = conn.cursor()
cmd = "SELECT * FROM sys_tablecolumns WHERE TableName = 'SampleTable_1'"
cur.execute(cmd)
rs = cur.fetchall()
for row in rs:
	print(row)

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