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/reverse-etl/system.md
+31
Original file line number
Diff line number
Diff line change
@@ -16,6 +16,37 @@ For Segment to compute the data changes within your warehouse, Segment needs to
16
16
> warning ""
17
17
> There may be cost implications to having Segment query your warehouse tables.
18
18
19
+
## Reverse ETL schema
20
+
When using Reverse ETL with Segment, several system tables are created within the `__segment_reverse_etl` schema in your warehouse. These tables are crucial for managing the sync process efficiently and tracking state information. Below are the details of the system tables in this schema:
21
+
22
+
### Records table
23
+
24
+
`records_<subscription_id>` table is located within the ` __segment_reverse_etl` schema.
25
+
26
+
This table contains two key columns:
27
+
28
+
-`record_id`: A unique identifier for each record.
29
+
-`checksum`: A checksum value that is used to detect changes to a record since the last sync.
30
+
The records table helps in determining new and updated rows by comparing the checksum values during each sync. If a record’s checksum changes, it indicates that the record has been modified and should be included in the next sync. This ensures that only the necessary updates are processed, reducing the amount of data transferred.
31
+
32
+
### Checkpoint table
33
+
34
+
The `checkpoints_<subscription_id>` tables are located within the __segment_reverse_etl schema.
35
+
36
+
This table contains the following columns:
37
+
38
+
-`source_id`: Identifies the source from which the data is being synced.
39
+
-`model_id`: Identifies the specific model or query that is used to pull data.
40
+
-`checkpoint`: Stores a timestamp value that represents the last sync point for a particular model.
41
+
42
+
The checkpoints table is used for timestamp-based checkpointing between syncs. This enables Segment to track the last successful sync for each model and avoid duplicating data when syncing, ensuring incremental and efficient data updates.
43
+
44
+
### Important Considerations
45
+
46
+
Do not modify or delete these tables. Altering or deleting the records and checkpoints tables can cause unpredictable behavior in the sync process. These tables are essential for maintaining the integrity of data during Reverse ETL operations.
47
+
State management: The `__segment_reverse_etl` schema and its associated tables (records and checkpoints) manage the state of each sync, ensuring that only necessary data changes are synced and that the sync process can resume where it left off.
48
+
49
+
19
50
## Limits
20
51
To provide consistent performance and reliability at scale, Segment enforces default use and rate limits for Reverse ETL.
Copy file name to clipboardExpand all lines: src/connections/sources/catalog/libraries/server/go/index.md
+2-4
Original file line number
Diff line number
Diff line change
@@ -18,15 +18,15 @@ All of Segment's server-side libraries are built for high-performance, so you ca
18
18
Install `analytics-go` using `go get`:
19
19
20
20
```bash
21
-
go get gopkg.in/segmentio/analytics-go.v3
21
+
go get github.com/segmentio/analytics-go/v3
22
22
```
23
23
24
24
Then import it and initialize an instance with your source's **Write Key**. Of course, you'll want to replace `YOUR_WRITE_KEY` with your actual **Write Key** which you can find in Segment under your source settings.
25
25
26
26
```go
27
27
package main
28
28
29
-
import"gopkg.in/segmentio/analytics-go.v3"
29
+
import"github.com/segmentio/analytics-go/v3"
30
30
31
31
funcmain() {
32
32
client:= analytics.New("YOUR_WRITE_KEY")
@@ -414,8 +414,6 @@ for example, with [govendor](https://github.com/kardianos/govendor){:target="_bl
Alternatively, you can also use [`gopkg.in`](http://labix.org/gopkg.in){:target="_blank”}. First run `go get gopkg.in/segmentio/analytics-go.v3` and replace your imports with `import "gopkg.in/segmentio/analytics-go.v3"`.
418
-
419
417
To help with migrating your code, Segment recommends checking out a simple example that is written in [v2](https://github.com/segmentio/analytics-go/blob/v2.0/examples/track.go) and [v3](https://github.com/segmentio/analytics-go/blob/v3.0/examples/track.go) so you can easily see the differences.
420
418
421
419
The first difference you'll notice is that `Client` is now an interface. It has a single method - `Enqueue` that can accept messages of all types.
Copy file name to clipboardExpand all lines: src/connections/sources/catalog/libraries/website/javascript/index.md
+4-3
Original file line number
Diff line number
Diff line change
@@ -138,10 +138,11 @@ The only required argument on Track calls in Analytics.js is an `event` name str
138
138
139
139
#### Track link
140
140
141
-
`trackLink` is a helper method that attaches the `track` call as a handler to a link.
142
-
With `trackLink`, Analytics.js inserts a timeout of 300 ms to give the `track` call more time. This is useful when a page would redirect before the `track` method could complete all requests.
141
+
`trackLink` is a helper method that attaches a Track call as a handler to a link. When a user clicks the link, `trackLink` delays the navigation event by 300ms before proceeding, ensuring the Track request has enough time to send before the page starts unloading.
143
142
144
-
The `trackLink` method follows the format below.
143
+
This is useful when a page redirects too quickly, preventing the Track method from completing all requests. By momentarily holding off navigation, `trackLink` increases the likelihood that tracking data reaches Segment and destinations successfully.
@@ -73,6 +74,7 @@ For non-Analytics.js sources, you’ll need to update your implementation to use
73
74
74
75
-**Server Sources**: When sending data from server-side implementations, use the `host` configuration parameter to send data to your subdomain instead of the default Segment domain.
75
76
-**Mobile Sources**: When sending data from mobile implementations, use the `apiHost` configuration parameter to send data to your subdomain instead of the default Segment domain.
77
+
-**Pixel API Sources**: When sending data from Pixel implementations, modify the endpoint from Segment's default domain (`https://api.segment.io/v1/pixel/track`) to your custom domain (`https://api.mysubdomain.mydomain.com/v1/pixel/track`).
76
78
77
79
### Is there a benefit in migrating server-side sources over to client-side with Custom Domain?
78
80
Server-side tracking is generally more reliable than client-side tracking. For example, when tracking data client-side, you might lose data when users might block all cookies or use tools that interfere with network requests leaving the browser.
0 commit comments