TableInfo クラス
dict に似た下位互換性を持つテーブル メタデータ。
未加工の dict API に対して記述されたコードとの下位互換性のために、新しい属性アクセス (info.schema_name) と従来の dict キー アクセス (info["table_schema_name"]) の両方をサポートします。
例:
info = client.tables.create("new_Product", {"new_Price": "decimal"})
print(info.schema_name) # new attribute access
print(info["table_schema_name"]) # legacy dict-key access
コンストラクター
TableInfo(schema_name: str = '', logical_name: str = '', entity_set_name: str = '', metadata_id: str = '', primary_name_attribute: str | None = None, primary_id_attribute: str | None = None, display_name: str | None = None, description: str | None = None, columns: List[ColumnInfo] | None = None, columns_created: List[str] | None = None)
パラメーター
| 名前 | 説明 |
|---|---|
|
schema_name
必須
|
テーブル スキーマ名 (例: |
|
logical_name
必須
|
テーブルの論理名 (小文字)。 |
|
entity_set_name
必須
|
OData エンティティ セット名。 |
|
metadata_id
必須
|
メタデータ GUID。 |
|
display_name
|
人間が判読できる表示名。 規定値: None
|
|
description
|
テーブルの説明。 規定値: None
|
|
columns
|
列メタデータ (取得時)。 規定値: None
|
|
columns_created
|
テーブルで作成された列名。 規定値: None
|
|
primary_name_attribute
|
規定値: None
|
|
primary_id_attribute
|
規定値: None
|
メソッド
| from_api_response |
生の Dataverse |
| from_dict |
SDK 内部ディクテーション (snake_case キー) から作成します。 これにより、OData レイヤーで |
| get |
キーの戻り値。存在しない場合は既定値。 |
| items |
(legacy_key、値) ペアを返します。 |
| keys |
従来の dict キーを返します。 |
| to_dict |
旧バージョンとの互換性のために、レガシ キーを含むディクテーションを返します。 |
| values |
従来の dict キーに対応する値を返します。 |
from_api_response
from_dict
get
キーの戻り値。存在しない場合は既定値。
get(key: str, default: Any = None) -> Any
パラメーター
| 名前 | 説明 |
|---|---|
|
key
必須
|
|
|
default
|
規定値: None
|
items
(legacy_key、値) ペアを返します。
items() -> List[tuple]
keys
従来の dict キーを返します。
keys() -> KeysView[str]
to_dict
旧バージョンとの互換性のために、レガシ キーを含むディクテーションを返します。
to_dict() -> Dict[str, Any]
values
従来の dict キーに対応する値を返します。
values() -> List[Any]
属性
columns
columns: List[ColumnInfo] | None = None
columns_created
columns_created: List[str] | None = None
description
description: str | None = None
display_name
display_name: str | None = None
entity_set_name
entity_set_name: str = ''
logical_name
logical_name: str = ''
metadata_id
metadata_id: str = ''
primary_id_attribute
primary_id_attribute: str | None = None
primary_name_attribute
primary_name_attribute: str | None = None
schema_name
schema_name: str = ''