Skip to content

Commit c31a6aa

Browse files
authored
Clarify data passed to SQL sink stored procedures
Although the size of data passed to stored procedures specified in Azure SQL Database sink is governed by the "writeBatchSize" property, this doc still contains warnings that the stored procedure is invoked row-by-row on the source table's content.
1 parent 947f1b5 commit c31a6aa

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

articles/data-factory/connector-azure-sql-database.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,7 @@ BEGIN
501501
END
502502
```
503503

504-
**Option 2:** You also can choose to [invoke a stored procedure within the copy activity](#invoke-a-stored-procedure-from-a-sql-sink). This approach runs each row in the source table instead of using bulk insert as the default approach in the copy activity, which isn't appropriate for large-scale upsert.
504+
**Option 2:** You also can choose to [invoke a stored procedure within the copy activity](#invoke-a-stored-procedure-from-a-sql-sink). This approach runs each batch (as governed by the `writeBatchSize` property) in the source table instead of using bulk insert as the default approach in the copy activity.
505505

506506
### Overwrite the entire table
507507

@@ -516,10 +516,7 @@ The steps to write data with custom logic are similar to those described in the
516516

517517
## <a name="invoke-a-stored-procedure-from-a-sql-sink"></a> Invoke a stored procedure from a SQL sink
518518

519-
When you copy data into Azure SQL Database, you also can configure and invoke a user-specified stored procedure with additional parameters. The stored procedure feature takes advantage of [table-valued parameters](https://msdn.microsoft.com/library/bb675163.aspx).
520-
521-
> [!TIP]
522-
> Invoking a stored procedure processes the data row by row instead of by using a bulk operation, which we don't recommend for large-scale copy. Learn more from [Best practice for loading data into Azure SQL Database](#best-practice-for-loading-data-into-azure-sql-database).
519+
When you copy data into Azure SQL Database, you also can configure and invoke a user-specified stored procedure with additional parameters on each batch of the source table. The stored procedure feature takes advantage of [table-valued parameters](https://msdn.microsoft.com/library/bb675163.aspx).
523520

524521
You can use a stored procedure when built-in copy mechanisms don't serve the purpose. An example is when you want to apply extra processing before the final insertion of source data into the destination table. Some extra processing examples are when you want to merge columns, look up additional values, and insert into more than one table.
525522

0 commit comments

Comments
 (0)