Connecting Segment data with Mammoth

Segment is a platform that collects, stores, and routes your customer data to hundreds of tools with the flick of a switch.

Mammoth can be set up as a data warehousing destination on segment. You can gather your data from your mobile apps, websites, or servers using Segment and store & analyze it in Mammoth.

Mammoth and Segment

About Segment

Segment is a great platform for sourcing your data a host of different sources. It could be your website, mobile app or server. Segment supports popular programming languages such as Ruby, Python and Javascript.

Once you have sourced your data, you can route it to one or more destinations. The destination catalog of Segment is quite impressive.

There are many of integrations you can choose from on both source side and destination side. Learn more about Segment integrations on their catalog page.

Getting Started

Assuming you already have a Segment account that is properly set up and is receiving data, here are three steps to get started using Mammoth with Segment.

  1. Create a webhook dataset on Mammoth & copy the API KEY for the dataset.
  2. Connect Segment and Mammoth.
  3. Use the Extract JSON task to flatten data.

Create a webhook dataset on Mammoth.

The data from Segment will be stored in a webhook dataset in Mammoth. You want to add a webhook type of dataset on Mammoth for Segment Integration.

  1. You need to create a new dataset of type webhooks. To do so, click on the big green button in the data library and click on the option Webhooks. If you do not have any datasets in your account, you will see a button to add a webhook dataset on the data library itself.
  2. This will open the add dataset dialog. Make sure the option selected is Webhooks.
  3. Give your dataset a name & click on Done. A new dataset will appear in the data library.
Add webhook Dataset

The dataset you created will have an API KEY which will be needed to proceed on Segment UI. Here is how you copy it:

Connect Segment and Mammoth.

  1. In the Segment App, select Add Destination. Search for and select Mammoth.
  2. Paste the API KEY you copied in the previous step into the UI.

Use the Extract JSON task to flatten data

Once you are configured according to the previous steps, data should start flowing into Mammoth. Mammoth will store all the data received from Segment in this dataset. You can use the Extract JSON task to flatten the data as rows and columns.

  1. When Mammoth receives data the, REFRESH button will show up in the preview panel. Click it to add that data to the dataset from the staging area.
  2. Select the dataset and click OPEN.
  3. You will be taken to the default View on the dataset. You will see one column of data called JSON.
  4. Now we want to flatten the JSON data. Open the Data Preparation menu and click on the Extract JSON task.
  5. Use the Extract JSON task as needed to flatten the data Extract JSON task will automatically suggest you the right options, and all you need to do is hit APPLY.
  6. You might need to apply the Extract JSON task multiple times if the JSON data from Segment is nested.

Mammoth will automatically refresh the data approximately every hour. You can also click on the REFRESH button to sync data immediately any time.