auto create file column if it doesnt exist#94
Merged
zhaodongwang-msft merged 10 commits intomainfrom Feb 4, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request enhances the file upload workflow by automatically creating file columns if they don't exist when uploading files. The changes consolidate column creation logic from application code into the SDK, making the upload process more user-friendly.
Changes:
- Modified
upload_filemethod to auto-create file columns and wait for them to become visible in the Data API before proceeding with upload - Updated parameter naming from
entity_settotable_schema_namefor consistency - Simplified example code by removing manual file attribute creation logic
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| src/PowerPlatform/Dataverse/data/_upload.py | Added logic to check for file column existence, create it if missing, and wait for visibility; updated parameter from entity_set to table_schema_name |
| src/PowerPlatform/Dataverse/data/_odata.py | Added _wait_for_attribute_visibility helper method and file attribute payload support in _attribute_payload |
| src/PowerPlatform/Dataverse/client.py | Updated upload_file to pass table_schema_name directly instead of resolving entity_set |
| README.md | Added comment clarifying automatic file column creation |
| src/PowerPlatform/Dataverse/claude_skill/SKILL.md | Added comment clarifying automatic file column creation |
| .claude/skills/dataverse-sdk/SKILL.md | Added comment clarifying automatic file column creation |
| examples/advanced/file_upload.py | Removed manual file attribute creation logic and reordered cleanup prompts for better UX |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
… waiting for newly created column
…logical name for better column creation support
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
added 2 commits
January 29, 2026 18:29
tpellissier-msft
approved these changes
Feb 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
updated upload_file function to auto create the file column if it doesn't exist. also included some minor improvments like supporting file column in create_column
Copilot summary:
This pull request introduces improvements to the file upload workflow, focusing on making the
upload_filemethod more robust and user-friendly. The most significant enhancement is the automatic creation of a file column if it does not exist when uploading a file, along with waiting for the new attribute to become visible before proceeding. Additional changes include code cleanup in the advanced file upload example and improved documentation.File upload improvements:
upload_filemethod now automatically checks if the specified file column exists; if not, it creates the column and waits for it to become visible in the data API before uploading the file. This ensures smoother uploads without manual column setup. [1] [2] [3]_upload_filehave been updated to usetable_schema_nameinstead ofentity_set, reflecting the new workflow and clarifying parameter expectations. [1] [2]upload_filemethod inclient.pynow passestable_schema_namedirectly, simplifying the call chain.Documentation updates:
README.mdand skill documentation files now clarify that the file column will be created automatically if it doesn't exist. [1] [2]Example and code cleanup:
file_upload.py) was refactored for clarity: variable initialization order was improved, the table schema name was updated for testing, log statements were made dynamic, and redundant attribute creation logic was removed (as this is now handled automatically by the upload method). [1] [2] [3] [4]