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.
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 Segment Catalog.
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.
- Create a webhook dataset on Mammoth & copy the API KEY for the dataset.
- Connect Segment and Mammoth.
- 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.
- 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.
- This will open the add dataset dialog. Make sure the option selected is Webhooks.
- Give your dataset a name & click on Done. A new dataset will appear in the data library.
The dataset you created will have an API KEY which will be needed to proceed on Segment UI. Here is how you copy it:
- Click on the new dataset you created in the previous step.
- On the preview panel, copy the API key by clicking on copy.
Connect Segment and Mammoth
- In the Segment App, select Add Destination. Search for and select Mammoth.
- 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.
- 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. - Select the dataset and click OPEN.
- You will be taken to the default View on the dataset. You will see one column of data called JSON.
- Now we want to flatten the JSON data. Open the Data Preparation menu and click on the Extract JSON task.
- 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.
- 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.
Recommended workflow
- You may also want to use the Apply Filter task along with Extract JSON task to flatten only certain types of data.
- You may want to use multiple different views to handle different types of events from Segment.
- We recommend that you use the Branch out to Dataset task in the Data Preparation menu to save your flattened data as a new dataset. Using this method, you separate your JSON extractions from your analysis & reporting.