Particle to Looker

This page provides you with instructions on how to extract data from Particle and analyze it in Looker. (If the mechanics of extracting data from Particle seem too complex or difficult to maintain, check out Stitch, which can do all the heavy lifting for you in just a few clicks.)

What is Particle?

Particle allows businesses to bring their Internet of Things (IoT) products to market faster. It provides a secure, easy-to-use, full-stack IoT cloud platform and low-cost connected hardware.

What is Looker?

Looker is a powerful, modern business intelligence platform that has become the new standard for how modern enterprises analyze their data. From large corporations to agile startups, savvy companies can leverage Looker's analysis capabilities to monitor the health of their businesses and make more data-driven decisions.

Looker is differentiated from other BI and analysis platforms for a number of reasons. Most notable is the use of LookML, a proprietary language for describing dimensions, aggregates, calculations, and data relationships in a SQL database. LookML enables organizations to abstract the query logic behind their analyses from the content of their reports, making their analytics easy to manage, evolve, and scale.

Getting data out of Particle

Particle exposes events through webhooks. To use webhooks, log into your Particle console and click on the Integrations tab, then click New Integration > Webhook. Set the event name to the item you want to track; it's good practice to specify the name of the field where you want the data to live in your data warehouse. Set the URL to the key or token that you'll use to accept the data. Leave the request type as POST. In the device field, select the device you want to trigger the webhook. Finally, click Create Webhook.

Sample Particle data

Particle sends data in JSON format via webhook through a POST request whenever an event triggers it to do so. The JSON fields and endpoints will match the data collected by your form. For instance:

{
    "event": [event-name],
    "data": [event-data],
    "published_at": [timestamp],
    "coreid": [device-id]
}

Loading data into Looker

To perform its analyses, Looker connects to your company's database or data warehouse, where the data you want to analyze is stored. Some popular data warehouses include Amazon Redshift, Google BigQuery, and Snowflake.

Looker's documentation offers instructions on how to configure and connect your data warehouse. In most cases, it's simply a matter of creating and copying access credentials, which may include a username, password, and server information. You can then move data from your various data sources into your data warehouse for Looker to use.

Analyzing data in Looker

Once your data warehouse is connected to Looker, you can build constructs known as explores, each of which is a SQL view containing a specific set of data for analysis. An example might be "orders" or "customers."

Once you've selected any given explore, you can filter data based on any column available in the view, group data based on certain fields in the view (known as dimensions), calculate outputs such as sums and counts (known as measures), and pick a visualization type such as a bar chart, pie chart, map, or bubble chart.

Beyond this simple use case, Looker offers a broad universe of functionality that allows you to conduct analyses and share them with your organization. You can get started with this walkthrough in Looker's documentation.

Keeping Particle data up to date

Once you've coded up a script or written a program to get the data you want and move it into your data warehouse, you're going to have to maintain it. If Particle modifies its API, or sends a field with a datatype your code doesn't recognize, you may have to modify the script. If your users want slightly different information, you definitely will have to.

From Particle to your data warehouse: An easier solution

As mentioned earlier, the best practice for analyzing Particle data in Looker is to store that data inside a data warehousing platform alongside data from your other databases and third-party sources. You can find instructions for doing these extractions for leading warehouses on our sister sites Particle to Redshift, Particle to BigQuery, and Particle to Snowflake.

Easier yet, however, is using a solution that does all that work for you. Products like Stitch were built to solve this problem automatically. With just a few clicks, Stitch starts extracting your Particle data via the API, structuring it in a way that is optimized for analysis, and inserting that data into a data warehouse that can be easily accessed and analyzed by Looker.