Last modified July 9, 2015 by John Kearney

Data Mining with Swrve

This tutorial section serves as an introduction to analysis of Swrve export data. Swrve export data enables you to dig deeper into the the data provided in the Swrve dashboard. Examples are provided using Amazon Redshift as the data storage platform.

Why Pull Data From Swrve?

To motivate our work in data mining, it is worth understanding some of the reasons that Swrve customers pull data out of Swrve for data mining. Often they are trying to do things like:

  • LTV analysis
  • Churn analysis (for example, last actions before churning)
  • Custom segmentation (for example, building custom audiences)
  • Custom KPIs (for example, time to first purchase)

Each of these use cases are custom based on the unique requirements of their business and not something that is typically available without ad-hoc analysis capabilities.

New to data mining? Contact our Data Services team at support@swrve.com.


Your Swrve Data

Your Swrve data is available from the following sources:

  • Raw Event Export data – the raw, unprocessed events your app sends us, in JSON format. This is the lowest level data available available from Swrve. These data export includes every action sent to the Swrve events APIs.
  • User DB Downloads – per-user records of current user state, in CSV format. This data is an export of the low level data used by Swrve segmentation. For more information on the User DB Downloads, see Intro to User Databases.
  • Swrve Export APIs – enables you to download all of the KPIs, in CSV or JSON format. This is data that is available aggregated by segment. For more information about the Swrve Export APIs, see the Swrve Export API Guide.
  • Dashboard Chart Downloads – enables you to download data from the dashboard charts.
Source Type Output format Granularity Use cases Prerequisites
Dashboard Chart download Chart contents CSV Single Chart Custom reporting, custom charts None
Swrve Export APIs Aggregate KPI data CSV / JSON Single Segment Custom reporting, custom dashboards Command line, REST API
User DB Downloads Per user segmentation data gzip CSV Single User User centric SQL queries, Deep-dive campaign analysis, Predictive analysis REST API, Command line, SQL
Raw Event Export Per user event data gzip JSON Single User event Event centric SQL queries, User behavior analysis REST API, Command line, SQL

While Swrve Export APIs and Dashboard Chart Downloads are useful for answering questions, the data mining tutorials focus on using the data from the User DB Downloads and Raw Event data sources. Combined, these two methods of data export allow for ad-hoc, deeper level queries into all the data being collected by the Swrve SDKs and APIs.

In these tutorials, you’ll set up an Amazon Redshift cluster, load Swrve event data into it and run queries to answer detailed questions about your users. The data mining tutorials are ideal for data analysts and technical users who want more insight from the data they’ve already collected with Swrve.

A comprehensive approach to data involves using each of these data sources. For example, you can easily create custom internal daily dashboards using the data from the Swrve Export APIs, but if you need to go deeper into the behavior of ad-hoc groups of users, the raw event export and User DB downloads are required.


Next Steps


Need a hosted solution?
Most Swrve customers can self-host this pipeline; all you have to do is follow the steps in these tutorials. However, if you require a turnkey hosted solution, we offer one as a professional service. There is an additional fee associated with this service. For more information, contact your Customer Success Manager at support@swrve.com.

Need help with Queries?
Swrve support can help you with basic setup and configuration of the pipeline described above. If you need help with your queries, contact our Data Services team at support@swrve.com. They will help you get the most out of your data with dedicated support, pre-built and custom reports, and dedicated data science hours.