Add a Data Model

When possible, you should try to modify or extend an existing data model instead of adding new data models for each new analysis. This section shows you how to quickly add data if you're getting started, you should also check out Data Models Overview and Data Modeling Best Practices

Preparing Data for Glean

Each Glean model is based on an underlying data table. For more technical advice see the best practices section on creating denormalized data tables.

If your data isn't quite in the right format in your database, it's possible to specify an underlying data query that will run as you explore data.

  1. From your project homepage, click New Model
  2. Select the data connection you'd like to use
  3. Select either an existing table or click SQL Editor to use a custom query
  4. Click Build Model to create the initial data model (All date fields and a row count metric are added by default)
  5. Edit the name of the data model at the top of the page
  6. Add additional metrics and attributes by clicking Add metric and Add Attribute next to the name of the field
  7. Create a SQL based custom metric by clicking + Add Custom Metric (see Metrics for more details)
  8. Click Save Model then click Open in Explore to start exploring the data