tables.update_column / update_columns: update existing column constraints (retrieve -> PUT + @odata.type) -- no metadata-write path exists today
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 68/100
調査の方向性
data/_odata.py と _odata_base.py::_attribute_payload から始め、続いて operations/tables.py と aio/operations/async_tables.py のテーブル操作を調査します。派生した @odata.type を含め、override の適用と送信される PUT リクエストをユニットテストで検証します。必要に応じて README と CHANGELOG を更新します。実装が #194 の override スキーマを共有し、verb と discriminator を内部に保持していることを確認します。
索引モデルが issue の本文から書いたものです。
説明
Summary
client.tables can create, add_columns, and remove_columns, but there is no way to update an existing column's definition -- MaxLength, MinValue/MaxValue, RequiredLevel, DisplayName, Format, etc. Today a caller who needs to widen a text column or change a required level must drop to the raw Web API PUT EntityDefinitions({id})/Attributes({id}) and hand-build the payload, including the derived @odata.type discriminator.
This is also the only place the counter-intuitive PUT-not-PATCH metadata-update contract is exposed to users. Metadata updates go over PUT with merge semantics (partial payloads are honored), which reads like PATCH behavior on the PUT verb. The right fix is not a platform verb change (that is a long pole) -- it is to hide the verb inside the SDK so users never choose it.
Context: parity with the .NET modern client
Microsoft.PowerPlatform.Dataverse.Client.ServiceClient never hits this, because it rides the Organization Service message contracts (Execute(new UpdateAttributeRequest { Attribute = new StringAttributeMetadata { MaxLength = 4000 } })) -- a typed message, no HTTP verb. The Python SDK is Web-API-bound and cannot borrow those contracts, so it should own the retrieve -> modify -> PUT (+ @odata.type) sequence internally to give the same UX (typed fields in, no verb visible).
Proposed change (backward-compatible)
Add update_column (+ update_columns) that accepts the same dict override schema proposed in #194, so create and update share one spec shape:
client.tables.update_column("cfb_CustomerFeedback", "cfb_Comment",
{"max_length": 4000, "display_name": "Customer Comment"})
Internally: GET the existing typed attribute -> apply overrides -> PUT back with the correct derived @odata.type. Never expose PUT/PATCH/@odata.type to the caller.
Touchpoints
data/_odata.py-- new_update_attribute(retrieve-then-PUTwith@odata.type); reuse_odata_base.py::_attribute_payloadoverride-building from #194.operations/tables.py+aio/operations/async_tables.py-- newupdate_column/update_columns.- Unit tests: override application + correct verb /
@odata.typeon the outbound request. - README + CHANGELOG per repo maintenance rules.
Acceptance
update_column(..., {"max_length": 4000})issues aPUTtoEntityDefinitions({id})/Attributes({id})withMaxLength: 4000and the correct derived@odata.type.- Caller never passes a verb or
@odata.type. - Depends on / shares the override-spec schema from #194.
Related
- #194 -- create-time column constraints (in progress).
- microsoft/Dataverse-skills#119 -- documents the raw Web API metadata contract this method replaces.
- 主要言語
- Python
- スター
- 60
- フォーク
- 23
- 平均マージ
- 13時間 53分
- マージ済み PR(30日)
- 3
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoft/PowerPlatform-DataverseClient-Python のほかの issue
-
enhancement
難易度 4/5 3〜5日 初心者へのやさしさ 55/100
-
enhancement
難易度 3/5 1〜2日 初心者へのやさしさ 72/100
-
enhancement
microsoft/PowerPlatform-DataverseClient-Python#194 · 担当者 1 名 ·
-
microsoft/PowerPlatform-DataverseClient-Python#170 · 担当者 1 名 ·
-
bug
microsoft/PowerPlatform-DataverseClient-Python#166 · コメント 1 件 · 担当者 1 名 ·
microsoft/PowerPlatform-DataverseClient-Python の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
zostera/django-bootstrap4#894 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
use-agent-os/agent-os#3276 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
zephyrproject-rtos/zephyr#119726 ·
-
area/auth bug comp/agent P3 platform/discord type/security
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
NousResearch/hermes-agent#117848 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
zilliztech/memsearch#759 ·