Docs
Default Exploration

Default Model Exploration

Data models support the ability to control the default exploration that is used when starting a new exploration from a data model.

Behavior without a default exploration

By default, when starting a new exploration from a data model, Hashboard bootstraps a visualization using your model's measures and attributes. If a model has a primary date attribute, your model will be bootstrapped as a bar chart with the primary date on the x-axis and first-defined measure on the y-axis. If a model does not have a date attribute, your model will be bootstrapped as a table.

Configuring a default exploration

Often times there may be a more useful starting point for your explorations based on a given model.

To configure a default exploration for a model:

  1. Configure a new exploration that you would like to use as the model's default with the Data Explorer.
  2. Once you have your exploration configured to your liking, reveal the "Code editor" by clicking the "Code editor" button.
  3. Copy the data and visualization fields and their associated values from the code editor. Keep these copied values handy.
  4. Open the "More" menu and select "Edit data model".
  5. Click the "Code editor" button inside the model builder.
  6. Once the code editor is open, add a new field at the root level named defaultExploration.
  7. Populate the defaultExploration field with the data and visualization values you copied in step 3.
  8. When you are done, click the "Save and Explore" button. You will be redirected to the Data explorer and your default exploration will be used as the starting point.

Examples

Default explorations support a wide variety of configurations, sharing many of the same options as saved explorations. The following are a few examples of different configurations you can use.

Line chart with a filter

hbVersion: "1.0"
type: model
defaultExploration:
  data:
    x:
      - columnId: created_at
        granularity: day
    y:
      - columnId: row_count
  visualization:
    chartType: line
  filters:
    - columnId: created_at
      gte: 2020-01-01
 ...

Funnel table

hbVersion: "1.0"
type: model
defaultExploration:
  data:
    sequence:
      - eventValue: user
      - eventValue: add_to_cart
      - eventValue: visit_checkout
    preFilters:
      - columnId: sent_at
        gte:
          - -2
          - week
          - startOfPeriod: false
  visualization:
    chartType: funnel_table