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
+13-19Lines changed: 13 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,16 +2,16 @@
2
2
title: Source Insert Functions
3
3
---
4
4
5
-
> info "Source Insert Function is in Public Beta"
6
-
> Source Insert Function is in public beta, and Segment is actively working on this feature. Some functionality may change before it becomes generally available.
5
+
Use Source Insert Functions to enrich, transform, or filter your data before it flows downstream to destinations.
7
6
8
-
## Create source insert functions
7
+
> info "Source Insert Function is in public beta"
8
+
> Source Insert Function is in public beta, and Segment is actively working on this feature. Some functionality may change before it becomes generally available.
9
9
10
10
There are two ways you can access source insert functions from your Segment workspace:
11
-
- From the [Connections catalog](#using-the-catalog).
12
-
- From the [Sources tab](#using-the-sources-tab).
11
+
- From the Connections catalog.
12
+
- From the Sources tab.
13
13
14
-
### Using the catalog
14
+
##Creating a Source Insert Function
15
15
16
16
To create a source insert function from Segment’s catalog:
17
17
@@ -23,9 +23,11 @@ To create a source insert function from Segment’s catalog:
23
23
24
24
4. Click **Next: Configure & Create** to add a function name, description (optional), and function logo (optional).
25
25
26
-
5. Click **Create Function** to save your insert function. The new source insert function displays in the Functions tab.
26
+
5. Click **Create Function** to save your insert function. The new source insert function displays in the Functions tab.
27
+
28
+
You can also go to **Conections** > **Sources** to create a source insert function.
27
29
28
-
####Coding the source insert function
30
+
### Coding the source insert function
29
31
30
32
Insert functions can define handlers for the following message types:
31
33
-`onIdentity`
@@ -36,15 +38,7 @@ Insert functions can define handlers for the following message types:
36
38
-`onAlias`
37
39
-`onDelete`
38
40
39
-
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.
40
-
41
-
### Using the Sources tab
42
-
43
-
You can also create a source insert function from Sources.
44
-
45
-
1. Navigate to **Connections** > **Sources**.
46
-
2. Select your source and go to the **Functions** tab.
47
-
3. Click **Create insert function** to create your insert function from scratch.
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.
48
42
49
43
### Connecting a source insert function to a source
50
44
@@ -68,9 +62,9 @@ You can `throw` the following pre-defined error types to indicate that the funct
68
62
69
63
This is similar to Source, Destination, and Insert Functions.
70
64
71
-
The errors listed are all permanent errors, except `RetryError`. When a `RetryError` is thrown, Segment will reattempt to run the function a set number of times before permanently erroring out.
65
+
The errors listed are all permanent errors, except `RetryError`. When a `RetryError` is thrown, Segment reattempts to run the function a set number of times before permanently erroring out.
72
66
73
-
###FAQs
67
+
## FAQs
74
68
75
69
##### Why does the Delivery Overview tab not display any errors that occur within the source insert function?
0 commit comments