CData Python Connector for Apache Phoenix

Build 23.0.8839

カラム

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

import cdata.apachephoenix as mod
conn = mod.connect("URL=http://localhost:8765;")
cur = conn.cursor()
cmd = "SELECT * FROM sys_tablecolumns WHERE TableName = '[SampleCatalog_1].[SampleSchema_1].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