Update how-to-use-stored-procedures-triggers-udfs.md#364
Update how-to-use-stored-procedures-triggers-udfs.md#364pietro29 wants to merge 1 commit intoMicrosoftDocs:mainfrom
Conversation
Fix python-sdk post-trigger invoke example
|
Learn Build status updates of commit dcfdc40: ✅ Validation status: passed
For more details, please refer to the build report. |
|
Can you review the proposed changes? IMPORTANT: When the changes are ready for publication, adding a #label:"aq-pr-triaged" |
|
@pietro29 : Thanks for your contribution! The author(s) and reviewer(s) have been notified to review your proposed change. |
There was a problem hiding this comment.
Pull request overview
This PR updates the Azure Cosmos DB documentation article to correct the Python SDK example for invoking a post-trigger.
Changes:
- Switch the Python
create_itemexample frompre_trigger_includetopost_trigger_includein the “call a post-trigger” snippet.
| item = {'category': 'Personal', 'name': 'Groceries', | ||
| 'description': 'Pick up strawberries', 'isComplete': False} | ||
| container.create_item(item, pre_trigger_include='trgPreValidateToDoItemTimestamp') | ||
| container.create_item(item, post_trigger_include='trgPreValidateToDoItemTimestamp') |
There was a problem hiding this comment.
The Python post-trigger invocation still references the pre-trigger id (trgPreValidateToDoItemTimestamp). In this section you register trgPostValidateToDoItemTimestamp, so this call won’t invoke the trigger that was just created. Update the post_trigger_include value to the post-trigger id used in the registration snippet to keep the sample runnable and consistent.
| container.create_item(item, post_trigger_include='trgPreValidateToDoItemTimestamp') | |
| container.create_item(item, post_trigger_include='trgPostValidateToDoItemTimestamp') |
|
This pull request has been inactive for 14 days. If you are finished with your changes, don't forget to sign off. See the contributor guide for instructions. If this PR is inactive for 14 more days, it will be closed automatically. Thank you! |
Fix python-sdk post-trigger invoke example