cubes:
  - name: users
    sql: >
      SELECT 1 as id, 'John' as first_name, 'Doe' as last_name, 'New York' as city
      UNION ALL
      SELECT 2, 'Jane', 'Smith', 'London'

    dimensions:
      - name: id
        sql: id
        type: number
        primary_key: true

      - name: full_name
        sql: "first_name || ' ' || last_name"
        type: string
        links:
          - name: google_search
            label: Search on Google
            url: "{full_name}"
            icon: brand-google
          - name: profile
            label: View profile
            dashboard: user_profile_123
          - name: city_dashboard
            label: City dashboard
            dashboard: city_dash
            params:
              - key: city
                value: "{city}"
              - key: user_id
                value: "{id}"
          - name: crm_link
            label: View in CRM
            dashboard: crm_contacts
            params:
              - key: full_name
                value: "{full_name}"
              - key: city
                value: "{city}"
              - key: duplicate_city
                value: "{city}"

      - name: city
        sql: city
        type: string

    measures:
      - name: count
        type: count
