Skip to content

Simplify batch create scenarios - #4

Merged
zhaodongwang-msft merged 2 commits into
mainfrom
user/jeffand/prefix
Sep 9, 2025
Merged

zhaodongwang-msft merged 2 commits into
mainfrom
user/jeffand/prefix

Conversation

@jeffandms

Copy link
Copy Markdown
Contributor

Updated the create method of the base odata.py SDK to support taking in either a single record, a list of dicts, or a python dataframe. When more than one record is provided, the updates are performed as a batch OData call to speed up the create process. Also removes the need of having a separate create_df, since dataframes are coalesced to list of dict and handled properly.

Also removed the describe_table auto-adding of prefixes, since this was breaking the ability to use out of the box first party tables like account and contact.

@zhaodongwang-msft
zhaodongwang-msft merged commit 84ae218 into main Sep 9, 2025
@zhaodongwang-msft
zhaodongwang-msft deleted the user/jeffand/prefix branch February 13, 2026 21:52
tpellissier-msft pushed a commit that referenced this pull request Feb 18, 2026
- Document type aliases in tables.create() columns param (#4)
- Clarify SQL description in client namespace summary (#8)
- Add :raises: for HttpError, ValidationError, ValueError across all
  operation methods (#6)
- Fix query.sql() to document ValidationError instead of incorrect
  SQLParseError
- Restore post-call validation in records.create() matching original
  client.create() behavior (#9)
- Improve deprecated get() docstring with explicit guidance on when to
  use records.get() vs query.get() (#10)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
tpellissier-msft pushed a commit that referenced this pull request Feb 18, 2026
- Document type aliases in tables.create() columns param (#4)
- Clarify SQL description in client namespace summary (#8)
- Add :raises: for HttpError, ValidationError, ValueError across all
  operation methods (#6)
- Fix query.sql() to document ValidationError instead of incorrect
  SQLParseError
- Restore post-call validation in records.create() matching original
  client.create() behavior (#9)
- Improve deprecated get() docstring with explicit guidance on when to
  use records.get() vs query.get() (#10)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
tpellissier-msft pushed a commit that referenced this pull request Feb 18, 2026
- Document type aliases in tables.create() columns param (#4)
- Clarify SQL description in client namespace summary (#8)
- Add :raises: for HttpError, ValidationError, ValueError across all
  operation methods (#6)
- Fix query.sql() to document ValidationError instead of incorrect
  SQLParseError
- Restore post-call validation in records.create() matching original
  client.create() behavior (#9)
- Improve deprecated get() docstring with explicit guidance on when to
  use records.get() vs query.get() (#10)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
tpellissier-msft added a commit that referenced this pull request Feb 19, 2026
#102)

* Add operation namespaces (client.records, client.query, client.tables)

Reorganize SDK public API into three operation namespaces per the SDK
Redesign Summary. New namespace methods use cleaner signatures (keyword-only
params, @overload for single/bulk, renamed table params) while all existing
flat methods (client.create, client.get, etc.) continue to work unchanged
with deprecation warnings that point to the new equivalents.

Key changes:
- records.create() returns str for single, list[str] for bulk
- query.get() handles paginated multi-record queries
- tables.create() uses solution= and primary_column= keyword args
- 40 new unit tests (75 total, all passing)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Fix PR review comments: docstrings, error docs, and create() validation

- Document type aliases in tables.create() columns param (#4)
- Clarify SQL description in client namespace summary (#8)
- Add :raises: for HttpError, ValidationError, ValueError across all
  operation methods (#6)
- Fix query.sql() to document ValidationError instead of incorrect
  SQLParseError
- Restore post-call validation in records.create() matching original
  client.create() behavior (#9)
- Improve deprecated get() docstring with explicit guidance on when to
  use records.get() vs query.get() (#10)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Use :class: role in :type:/:rtype: directives for Sphinx cross-references

Aligns with existing codebase convention and ensures clickable
hyperlinks in generated API documentation.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: tpellissier <tpellissier@microsoft.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Saurabh Ravindra Badenkal (saurabhrb) pushed a commit that referenced this pull request Mar 22, 2026
…* + JOIN behavior

- SELECT * with JOIN only expands first (FROM) table columns
- Joined table columns are NOT included in expansion
- Added sql_select()/sql_columns() as recommended alternative
- Updated guardrail summary to mention all blocked patterns
abelmilash-msft pushed a commit that referenced this pull request Apr 13, 2026
… validation

- Fix .. note:: in records.create/update/upsert to mention concurrent dispatch
  when max_workers > 1, not just sequential chunking (comment #1)
- Import _MAX_WORKERS in records.py and build the ValueError message from it
  so the text stays accurate if the cap changes (comment #2)
- Add explicit ValueError in _dispatch_chunks for non-int or < 1 max_workers,
  with three new tests covering zero, negative, and non-int inputs (comments #4/#5)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants