Skip to content

Commit 1ba8056

Browse files
committed
update docs owner and reference UDF doc
1 parent f9adb5d commit 1ba8056

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

articles/cosmos-db/sql-query-udfs.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
---
22
title: User-defined functions (UDFs) in Azure Cosmos DB
33
description: Learn about User-defined functions in Azure Cosmos DB.
4-
author: markjbrown
4+
author: timsander1
55
ms.service: cosmos-db
66
ms.topic: conceptual
77
ms.date: 04/09/2020
8-
ms.author: mjbrown
8+
ms.author: tisande
99
---
1010

1111
# User-defined functions (UDFs) in Azure Cosmos DB

articles/cosmos-db/stored-procedures-triggers-udfs.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
---
22
title: Work with stored procedures, triggers, and UDFs in Azure Cosmos DB
33
description: This article introduces the concepts such as stored procedures, triggers, and user-defined functions in Azure Cosmos DB.
4-
author: markjbrown
4+
author: timsander1
55
ms.service: cosmos-db
66
ms.topic: conceptual
7-
ms.date: 08/01/2019
8-
ms.author: mjbrown
7+
ms.date: 04/09/2020
8+
ms.author: tisande
99
ms.reviewer: sngun
1010

1111
---
@@ -65,7 +65,7 @@ Stored procedures and triggers are always executed on the primary replica of an
6565

6666
All Azure Cosmos DB operations must complete within the specified timeout duration. This constraint applies to JavaScript functions - stored procedures, triggers, and user-defined functions. If an operation does not complete within that time limit, the transaction is rolled back.
6767

68-
You can either ensure that your JavaScript functions finish within the time limit or implement a continuation-based model to batch/resume execution. In order to simplify development of stored procedures and triggers to handle time limits, all functions under the Azure Cosmos container (for example, create, read, update, and delete of items) return a boolean value that represents whether that operation will complete. If this value is false, it is an indication that the procedure must wrap up execution because the script is consuming more time or provisioned throughput than the configured value. Operations queued prior to the first unaccepted store operation are guaranteed to complete if the stored procedure completes in time and does not queue any more requests. Thus, operations should be queued one at a time by using JavaScript’s callback convention to manage the script’s control flow. Because scripts are executed in a server-side environment, they are strictly governed. Scripts that repeatedly violate execution boundaries may be marked inactive and can't be executed, and they should be recreated to honor the execution boundaries.
68+
You can either ensure that your JavaScript functions finish within the time limit or implement a continuation-based model to batch/resume execution. In order to simplify development of stored procedures and triggers to handle time limits, all functions under the Azure Cosmos container (for example, create, read, update, and delete of items) return a boolean value that represents whether that operation will complete. If this value is false, it is an indication that the procedure must wrap up execution because the script is consuming more time or provisioned throughput than the configured value. Operations queued prior to the first unaccepted store operation are guaranteed to complete if the stored procedure completes in time and does not queue any more requests. Thus, operations should be queued one at a time by using JavaScript's callback convention to manage the script's control flow. Because scripts are executed in a server-side environment, they are strictly governed. Scripts that repeatedly violate execution boundaries may be marked inactive and can't be executed, and they should be recreated to honor the execution boundaries.
6969

7070
JavaScript functions are also subject to [provisioned throughput capacity](request-units.md). JavaScript functions could potentially end up using a large number of request units within a short time and may be rate-limited if the provisioned throughput capacity limit is reached. It is important to note that scripts consume additional throughput in addition to the throughput spent executing database operations, although these database operations are slightly less expensive than executing the same operations from the client.
7171

@@ -79,14 +79,14 @@ Azure Cosmos DB provides triggers that can be invoked by performing an operation
7979

8080
### Post-triggers
8181

82-
Similar to pre-triggers, post-triggers, are also associated with an operation on an Azure Cosmos item and they dont require any input parameters. They run *after* the operation has completed and have access to the response message that is sent to the client. For examples, see [How to write triggers](how-to-write-stored-procedures-triggers-udfs.md#triggers) article.
82+
Similar to pre-triggers, post-triggers, are also associated with an operation on an Azure Cosmos item and they don't require any input parameters. They run *after* the operation has completed and have access to the response message that is sent to the client. For examples, see [How to write triggers](how-to-write-stored-procedures-triggers-udfs.md#triggers) article.
8383

8484
> [!NOTE]
8585
> Registered triggers don't run automatically when their corresponding operations (create / delete / replace / update) happen. They have to be explicitly called when executing these operations. To learn more, see [how to run triggers](how-to-use-stored-procedures-triggers-udfs.md#pre-triggers) article.
8686
8787
## <a id="udfs"></a>User-defined functions
8888

89-
User-defined functions (UDFs) are used to extend the SQL API query language syntax and implement custom business logic easily. They can be called only within queries. UDFs do not have access to the context object and are meant to be used as compute only JavaScript. Therefore, UDFs can be run on secondary replicas. For examples, see [How to write user-defined functions](how-to-write-stored-procedures-triggers-udfs.md#udfs) article.
89+
[User-defined functions](sql-query-udfs.md) (UDFs) are used to extend the SQL API query language syntax and implement custom business logic easily. They can be called only within queries. UDFs do not have access to the context object and are meant to be used as compute only JavaScript. Therefore, UDFs can be run on secondary replicas. For examples, see [How to write user-defined functions](how-to-write-stored-procedures-triggers-udfs.md#udfs) article.
9090

9191
## <a id="jsqueryapi"></a>JavaScript language-integrated query API
9292

0 commit comments

Comments
 (0)