{#- Hello-world Lakeview dashboard — replaced by /plan + /build-next -#}
{
  "pages": [
    {
      "name": "sample_page",
      "displayName": "{{ demo_title }} — Sample Dashboard",
      "layout": [
        {
          "widget": {
            "name": "total_customers_counter",
            "queries": [
              {
                "name": "main_query",
                "query": {
                  "datasetName": "gold_summary",
                  "disaggregated": true,
                  "fields": [
                    {
                      "name": "total_customers",
                      "expression": "`total_customers`"
                    }
                  ]
                }
              }
            ],
            "spec": {
              "version": 2,
              "widgetType": "counter",
              "encodings": {
                "value": {
                  "fieldName": "total_customers",
                  "displayName": "Total Customers"
                }
              },
              "frame": {
                "showTitle": true,
                "title": "Total Customers"
              }
            }
          },
          "position": {
            "x": 0,
            "y": 0,
            "width": 2,
            "height": 3
          }
        },
        {
          "widget": {
            "name": "avg_balance_counter",
            "queries": [
              {
                "name": "main_query",
                "query": {
                  "datasetName": "gold_summary",
                  "disaggregated": true,
                  "fields": [
                    {
                      "name": "avg_balance",
                      "expression": "`avg_balance`"
                    }
                  ]
                }
              }
            ],
            "spec": {
              "version": 2,
              "widgetType": "counter",
              "encodings": {
                "value": {
                  "fieldName": "avg_balance",
                  "displayName": "Avg Balance"
                }
              },
              "frame": {
                "showTitle": true,
                "title": "Avg Balance"
              }
            }
          },
          "position": {
            "x": 2,
            "y": 0,
            "width": 2,
            "height": 3
          }
        },
        {
          "widget": {
            "name": "avg_risk_counter",
            "queries": [
              {
                "name": "main_query",
                "query": {
                  "datasetName": "gold_summary",
                  "disaggregated": true,
                  "fields": [
                    {
                      "name": "avg_risk_score",
                      "expression": "`avg_risk_score`"
                    }
                  ]
                }
              }
            ],
            "spec": {
              "version": 2,
              "widgetType": "counter",
              "encodings": {
                "value": {
                  "fieldName": "avg_risk_score",
                  "displayName": "Avg Risk Score"
                }
              },
              "frame": {
                "showTitle": true,
                "title": "Avg Risk Score"
              }
            }
          },
          "position": {
            "x": 4,
            "y": 0,
            "width": 2,
            "height": 3
          }
        },
        {
          "widget": {
            "name": "customers_table",
            "queries": [
              {
                "name": "main_query",
                "query": {
                  "datasetName": "silver_customers",
                  "disaggregated": true,
                  "fields": [
                    {"name": "customer_id", "expression": "`customer_id`"},
                    {"name": "name", "expression": "`name`"},
                    {"name": "email", "expression": "`email`"},
                    {"name": "balance", "expression": "`balance`"},
                    {"name": "risk_score", "expression": "`risk_score`"},
                    {"name": "signup_date", "expression": "`signup_date`"}
                  ]
                }
              }
            ],
            "spec": {
              "version": 2,
              "widgetType": "table",
              "encodings": {
                "columns": [
                  {"fieldName": "customer_id", "displayName": "ID"},
                  {"fieldName": "name", "displayName": "Name"},
                  {"fieldName": "email", "displayName": "Email"},
                  {"fieldName": "balance", "displayName": "Balance"},
                  {"fieldName": "risk_score", "displayName": "Risk"},
                  {"fieldName": "signup_date", "displayName": "Signup"}
                ]
              },
              "frame": {
                "showTitle": true,
                "title": "Customers"
              }
            }
          },
          "position": {
            "x": 0,
            "y": 3,
            "width": 6,
            "height": 6
          }
        }
      ]
    }
  ],
  "datasets": [
    {
      "name": "gold_summary",
      "displayName": "Gold Customer Summary",
      "query": "SELECT * FROM {{ catalog }}.default.gold_customer_summary"
    },
    {
      "name": "silver_customers",
      "displayName": "Silver Customers",
      "query": "SELECT customer_id, name, email, age, balance, risk_score, signup_date\nFROM {{ catalog }}.default.silver_customers\nLIMIT 100"
    }
  ]
}
