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/guides/how-to-guides/import-historical-data.md
+9-5Lines changed: 9 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,13 +4,13 @@ title: Importing Historical Data
4
4
5
5
When transitioning over to Segment, customers commonly want to import historical data into tools they are migrating to or evaluating.
6
6
7
-
**Note:** Historical imports can only be done into destinations that can accept historical timestamped data. Most analytics tools like Mixpanel, Amplitude, Kissmetrics, etc. can handle that type of data just fine. One common destination that does not accept historical data is Google Analytics, since their API cannot accept historical data.
7
+
**Note:** Historical imports can only be done into destinations that can accept historical timestamped data. Most analytics tools like Mixpanel, Amplitude, or Kissmetricscan handle that type of data just fine. One common destination that doesn't accept historical data is Google Analytics, since their API cannot accept historical data.
8
8
9
9
Use any [server-side library](https://segment.com/docs/connections/sources/#server), which sends requests in batches to improve performance. Once you have data to import, follow the steps below:
10
10
11
11
1. Export or collect the data to be imported.
12
12
13
-
Include timestamp data in your export if the data needs to appear in end tools in a historical reference. For instance if you are importing emails and it is relevant when they joined your email list, you may need to export the timestamp. **If no timestamp is specified when importing, the data will show a timestamp from the time the data was received**.
13
+
Include timestamp data in your export if the data needs to appear in end tools in a historical reference. For instance, if you're importing emails and it's relevant to know when someone joined your email list, you may need to export the timestamp. **If no timestamp is specified when importing, the data will show a timestamp from the time the data was received**.
14
14
15
15
2. Decide which destinations need to receive the data.
16
16
@@ -27,10 +27,14 @@ Use any [server-side library](https://segment.com/docs/connections/sources/#ser
27
27
28
28
You will need to cycle through each set of data and map it to a Segment server-side library method or build an array matching the [HTTP Import API format](https://segment.com/docs/connections/sources/catalog/libraries/server/http/#import). **Note**, we recommend using a Segment library for this process, as they will set contextual message fields like `message_id` (used for deduping) and `sent_at` (used for correctly client clock skew) that our API will use to ensure correct behavior upon ingestion. The server-side libraries will automatically batch requests to optimize for performance and prevent linear request volume. This batching behavior is modifiable. Some of the libraries implement a configurable max queue size that may discard messages if you enqueue requests much faster than the client can flush them. We recommend overriding the max queue size parameter for the library to a high value you're comfortable you can remain under in your batch job.
29
29
30
-
One ofour Success Engineers wrote an alpha prototype Node.js app for importing data utilizing the HTTPAPI, which we've included below:
30
+
One ofSegment's Success Engineers wrote an alpha prototype Node.js app for importing data utilizing the HTTP API, which we've included below:
Additionally, oneofSegment's Software Engineers developed a React App with more out of the box functionality for importing events. The features include a modern UI, transformations, and event format checking prior to import:
If a server-side library doesn'tmeetyourneeds, usetheSegment [bulkimportHTTPAPI](https://segment.com/docs/connections/sources/catalog/libraries/server/http/#import). **Note**, if you're using the HTTP API directly to replay data you've exported from Segment, we recommend removing the original `sent_at`, `message_id`, and `project_id` fields from the archived message before forwarding them to Segment.
35
39
36
-
Our friends at [MarketLytics](http://marketlytics.com/) have written up their experience using the alpha prototype importer and offer some [helpful visuals and tips](http://marketlytics.com/blog/import-historic-data-to-segment).
40
+
[MarketLytics](http://marketlytics.com/){:target="_blank"} has documented their experience using the alpha prototype importer and offer some [helpful visuals and tips](http://marketlytics.com/blog/import-historic-data-to-segment){:target="_blank"}.
0 commit comments