Start Free

Speed up your data preparation with Trifacta

Free Sign Up
Wrangle Summit 2021 On Demand

You can still experience the best people, ideas and technology in data engineering, all in one place

Get All-Access Pass
All Templates

Understanding Purchase Patterns Better with Market Basket Analysis

Market basket analysis Flow The flow view of this template

list, nest, unnest, flatten, deduplicate, groupby (aggregate)

This example flow shows how you can do a market basket analysis (also known as an affinity analysis) that’s very common in analytic scenarios in the retail industry. It works by looking at combinations of items that occur together frequently in shopping transactions. It allows a retailer to identify relationships between the items that people buy.

The flow makes extensive use of object and array functions in Trifacta so it can create the object for extracting individual purchased items. You can use this technique for your own basket or affinity analysis use cases.

New to Trifacta?

Sign up below to our free 30-day trial to use this template.


Already have an account?

Download template (Trifacta version) and import it on the Flows page.

Is your data on Google Cloud?

  1. Download template (Dataprep version)
  2. Launch Dataprep on Google Cloud
  3. Import it on Flows page

Learn more about Dataprep

How to Import