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: src/connections/functions/source-insert-functions.md
+24-4Lines changed: 24 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,7 +25,7 @@ To create a source insert function from Segment’s catalog:
25
25
26
26
5. Click **Create Function** to save your insert function. The new source insert function displays in the Functions tab.
27
27
28
-
You can also go to **Conections** > **Sources** to create a source insert function.
28
+
You can also go to **Conections** > **Sources** to create a source insert function in the Sources tab.
29
29
30
30
### Coding the source insert function
31
31
@@ -40,13 +40,33 @@ Insert functions can define handlers for the following message types:
40
40
41
41
The default source code template includes handlers for all event types. Implement the types you need. For event types you want to send through, return the event in the respective event handler.
42
42
43
+
### Settings
44
+
45
+
You can add and edit settings for source insert functions in the code editor. Settings allow you to configure the behavior of your source insert function, which changes how it is displayed to anyone using your function. To set up:
46
+
47
+
1. Go to the **Settings** tab in the code editor and click **Add Setting**.
48
+
2. Add the details about this setting.
49
+
3. Click **Add Setting** to save the configuration.
50
+
51
+
As you change values, such as **Label**, **Name**, **Type**, and **Description**, a preview updates showing how your setting will look and work. Once saved, the new setting appears in the **Settings** tab of the function. Here, you can edit or delete the setting.
52
+
53
+
### Testing
54
+
55
+
You can test your source insert function with sample events or a manual configuration in the code editor. This allows you to test the functions behavior with real incoming data. To do this:
56
+
57
+
1. Go to the **Test** tab in the code editor and click **Use Sample Event** or **customize the event yourself** to set up your test data.
58
+
2. Click **Run** to execute the test.
59
+
60
+
Test results appear under **Output**, showing whether the function ran successfully or failed.
61
+
62
+
43
63
### Connecting a source insert function to a source
44
64
45
65
For data to flow downstream after transformation, connect your source insert function to a source. To do this:
46
66
47
67
1. Select the insert function you want to connect to the source. You can edit, delete, and connect the insert function on the side pane.
48
-
2. Click *Connect a source**.
49
-
3. Select the source you want to connect to and click **Connect to Source**.
68
+
2. Click **Connect a source**.
69
+
3. Select the source you want to connect to and click **Connect to Source**.
50
70
51
71
### Errors and error handling
52
72
@@ -68,7 +88,7 @@ The errors listed are all permanent errors, except `RetryError`. When a `RetryEr
68
88
69
89
##### Why does the Delivery Overview tab not display any errors that occur within the source insert function?
70
90
71
-
If errors arise or events are dropped, they appear as if the events never flowed from the source.
91
+
Errors in the Delivery Overview tab are not yet visible and is a work in progress.
72
92
73
93
##### Can I test the function with different event types?
0 commit comments