You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/machine-learning/deploy/modify-r-python-code-to-run-in-sql-server.md
+17-4Lines changed: 17 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -72,12 +72,25 @@ How much you change your code depends on whether you intend to submit the code f
72
72
73
73
+ When running code in a stored procedure, you can pass through multiple **scalar** inputs. For any parameters that you want to use in the output, add the **OUTPUT** keyword.
74
74
75
-
For example, the following scalar input `@model_name` contains the model name, which is also output in its own column in the results:
75
+
For example, the following scalar input `@model_name` contains the model name, which is also later modified by the R script, and output in its own column in the results:
-- optionally, examine the new value for the local variable:
93
+
SELECT @local_model_name;
81
94
```
82
95
83
96
+ Any variables that you pass in as parameters of the stored procedure [sp_execute_external_script](../../relational-databases/system-stored-procedures/sp-execute-external-script-transact-sql.md) must be mapped to variables in the code. By default, variables are mapped by name. All columns in the input dataset must also be mapped to variables in the script.
0 commit comments