필드 매개변수

이 페이지는 필드를 정의하는 모든 LookML 매개변수로 연결됩니다.

필드에는 다음과 같은 여러 유형이 있습니다.

  • 측정기준은 테이블의 열 또는 일종의 열 조작이나 조합을 기반으로 계산된 값을 나타냅니다.
  • 측정기준 그룹은 시간 기반 데이터에만 사용되며 한 번에 여러 시간 기반 측정기준을 만들 수 있습니다.
  • 측정값은 SQL의 집계 함수 (예: COUNT, SUM, AVG)와 유사하며 여러 행에 관한 정보를 나타냅니다.
  • 필터는 사용자가 템플릿 필터 또는 조건부 조인에 입력을 제공하는 데 사용할 수 있는 필터 전용 필드를 만듭니다.
  • 매개변수는 사용자가 Liquid {% parameter %} 태그에 입력을 제공하는 데 사용할 수 있는 필터 전용 필드를 만듭니다.

사용 예시

매개변수 이름 위로 마우스 포인터를 가져가면 간단한 설명이 표시됩니다. 매개변수 이름을 클릭하여 참조 페이지로 이동합니다.

매개변수를 여러 특정 옵션 중 하나로 설정할 수 있는 경우 기본값이 먼저 나열됩니다.

## STRUCTURAL PARAMETERS
view: view_name {
  (dimension |dimension_group |measure |filter | parameter):field_name{
    intervals: [interval, interval, …]
    timeframes: [timeframe, timeframe, …]

    # ACTION AND LINKING PARAMETERS
    action: {
      label: "Label to Appear in Action Menu"
      url: "url"
      icon_url: "url"
      form_url: "url"
      param: {
        name:  "name string"
        value:  "value string"
      }
      # Possibly more param definitions
      form_param: {
        name:  "title"
        type: select | string | textarea
        label:  "desired label name"
        required:  yes | no
        default:  "value string"
        option: {
          name:  "name string"
          value:  "value string"
        }
        # Possibly more option definitions
      }
      # Possibly more form_param definitions
    }
    drill_fields: [field_or_set, field_or_set, ...]
    tags: ["string1", "string2", ...]
    link: {
      label: "desired label name;"
      url: "desired_url"
      icon_url: "url_of_an_image_file"
    }
    # Possibly more link definitions
    # DISPLAY PARAMETERS
    alias: [old_field_name, old_field_name, ...]
    alpha_sort: yes | no
    description: "description string"
    group_label:  "desired group label name"
    group_item_label:  "label to use under the group label in the field picker"
    hidden: yes | no
    label: "desired label name"
    label_from_parameter: parameter_name
    order_by_field: dimension_name | dimension_group_name | measure_name 
    style: classic | interval | integer | relational
    view_label: "desired label name"

    # FILTER PARAMETERS
    can_filter: yes | no
    case_sensitive: yes | no
    filters: [dimension: "filter expression", dimension: "filter expression", ...]
    skip_drill_filter: yes | no

    # FILTER SUGGESTION PARAMETERS
    allowed_value: {
      label: "desired label name"
      value: "looker filter expression"
    }
    # Possibly more allowed_value definitions
    bypass_suggest_restrictions: yes | no
    full_suggestions: yes | no
    suggest_dimension: dimension_name
    suggest_explore: explore_name
    suggest_persist_for: "N (seconds | minutes | hours)"
    suggestable: yes | no
    suggestions: ["suggestion string", "suggestion string", "…"]<

    # QUERY PARAMETERS
    allow_approximate_optimization: yes | no
    approximate: yes | no
    approximate_threshold: N
    convert_tz: yes | no
    datatype: epoch | timestamp | datetime | date | yyyymmdd
    fanout_on: repeated_record_name
    precision: N
    primary_key: yes | no
    required_access_grants: [access_grant_name, access_grant_name, ...]
    required_fields: [field_name, field_name, ...]
    sql_distinct_key: SQL expression to define repeated entities ;;

    # VALUE AND FORMATTING PARAMETERS
    case: {
      when: {
        sql: SQL condition ;;
        label: "value"
      }
      # Possibly more when statements
    }
    default_value: "desired default value"
    direction: "row | column"
    end_location_field: dimension_name
    html: HTML expression using Liquid template elements ;;
    list_field: dimension_name

    percentile: Nth percentile
    sql: SQL expression to generate the field value ;;
    sql_end: SQL expression indicating the end time of a duration ;;
    sql_latitude: SQL expression to generate a latitude ;;
    sql_longitude: SQL expression to generate a longitude ;;
    sql_start: SQL expression indicating the start time of a duration ;;
    start_location_field: dimension_name
    synonyms: [synonym1, synonym2, ...]
    tiers: [N, N, ...]
    type: dimension_field_type # For a dimension field
    type: dimension_group_type
# For a dimension_group field
    type: measure_field_type   # For a measure field
    type: filter_field_type    # For a filter field
    type: parameter_field_type # For a parameter field
    string_datatype: unicode # For a dimension field
    units: feet | kilometers | meters | miles | nautical_miles | yards
    value_format: "excel-style formatting string"
    value_format_name: format_name

    # VISUALIZATION PARAMETERS
    allow_fill: yes | no
    map_layer_name: name_of_map_layer
  }
}

매개변수 정의

  • D = Dimension(측정기준)
  • DG = Dimension Group(측정기준 그룹)
  • M = Measure(측정)
  • F = 필터
  • P = Parameter(매개변수)
파라미터 이름 유효한 필드 유형 설명
구조적 매개변수
dimension D 측정기준 필드를 만듭니다.
dimension_group DG 여러 시간 기반 측정기준을 동시에 만듭니다.
filter F 템플릿 필터 또는 조건부 조인에 사용할 필터 전용 필드를 만듭니다.
measure M 측정 필드를 만듭니다.
parameter P 사용자가 Liquid {% parameter %} 태그에 입력을 제공하는 데 사용할 수 있는 필터 전용 필드를 만듭니다.
intervals DG type: durationdimension_group에 원하는 기간 측정기준의 집합을 정의합니다.
timeframes DG type: timedimension_group에 원하는 기간 측정기준의 집합을 정의합니다.
작업 및 연결 매개변수
action D M 사용자가 Looker에서 직접 다른 도구의 작업을 수행할 수 있도록 필드에 데이터 작업을 만듭니다.
drill_fields D DG M 측정값 또는 측정기준을 드릴할 때 표시될 필드 목록을 선언합니다.
link D M 다른 Looker 및 외부 콘텐츠로 연결되는 링크를 만듭니다.
tags D DG M F P 필드에 관한 데이터를 제공하기 위해 다른 애플리케이션에 전달할 수 있는 텍스트를 추가합니다.
디스플레이 매개변수
alias D DG M F P 필드 이름이 바뀐 후에도 이전 필드 이름이 포함된 저장된 URL이 계속 작동하도록 허용
alpha_sort D case 매개변수가 조건을 알파벳순으로 정렬하도록 합니다.
description D DG M F P 사용자가 필드 위로 마우스 커서를 가져갈 때 볼 수 있는 설명을 필드에 추가합니다.
group_label D DG M F 필드 선택 도구의 뷰 내에서 필드를 함께 그룹화합니다.
group_item_label D DG M F 필드 선택 도구의 그룹 라벨 아래에 있는 필드에 사용할 라벨을 지정합니다.
hidden D DG M F P Explore UI에서 필드를 숨깁니다.
label D DG M F P 필드 선택 도구에 필드 이름이 표시되는 방식을 변경합니다.
label_from_parameter D M parameter에 대한 입력을 기반으로 시각화에 필드 이름이 표시되는 방식을 변경합니다.
order_by_field D DG M

다른 필드의 값으로 필드를 정렬합니다.

측정기준, 측정기준 그룹에 지원됨

측정에서 지원됨

style D type: tier 측정기준의 Looker UI에 등급이 표시되는 방식을 변경합니다.
view_label D DG M F P 필드 선택 도구의 뷰에 표시되는 필드를 변경합니다.
필터 매개변수
can_filter D DG M 측정기준 또는 측정값을 필터로 사용할 수 있는지 여부를 확인합니다.
case_sensitive D F 측정기준에 대해 필터가 대소문자를 구분하는지 여부를 확인합니다.
filter F 템플릿 필터에서 사용할 필터 전용 필드를 만듭니다.
filters M 측정값의 계산을 측정기준 제한에 따라 제한합니다.
skip_drill_filter D 측정값을 드릴할 때 측정기준이 필터에 추가되지 않도록 합니다.
필터 추천 파라미터
allowed_value P parameter의 선택사항을 지정합니다.
bypass_suggest_restrictions D DG F P sql_always_where 사용 시 사용자에게 제안을 표시하지만 제안에는 이러한 제한을 적용하지 않습니다.
full_suggestions D DG F P Looker가 데이터베이스를 쿼리하여 Explore의 필터에 있는 필드 값에 대한 추천을 제공하는 방식을 제어합니다. Looker는 기본 SELECT DISTINCT 쿼리를 사용할 수 있으며, 조인, sql_always_where, access_filter 매개변수를 포함한 Explore의 전체 로직을 사용할 수도 있습니다.
suggest_dimension D DG M F P 다른 측정기준의 값을 기반으로 필드에 대한 제안을 제공합니다.
suggest_explore D DG M F P 다른 Explore의 값을 기반으로 필드에 대한 추천을 제공합니다.
suggest_persist_for D F P Looker 필터 추천의 캐시 설정을 변경합니다.
suggestable D DG M F P 필드의 추천을 사용 설정 또는 사용 중지합니다.
suggestions D F P 필드의 추천에 사용될 값 목록을 선언합니다.
쿼리 매개변수
allow_approximate_optimization M type: count 또는 type: count_distinct 측정값의 고유 개수 근사치를 허용하여 측정값을 집계 인식에 사용할 수 있도록 합니다.
approximate M type: count_distinct 측정값의 근사치 개수를 수행합니다. 이 매개변수를 지원하는 언어 목록은 approximate 문서 페이지를 참고하세요.
approximate_threshold M BigQuery가 정확한 고유값에서 대략적인 고유값으로 전환되는 개수를 설정합니다.
convert_tz D DG M F P 필드의 시간대 자동 변환을 사용 중지합니다.
datatype D DG F M 필드에 제공하는 시간 데이터의 유형을 지정합니다.
fanout_on D DG M Google BigQuery 반복 필드에 대한 액세스를 사용 설정합니다.
precision M Looker 대칭 집계에 대한 계산을 실행할 때 사용할 소수점 이하 자릿수를 지정합니다.
primary_key D 측정기준을 뷰의 기본 키로 선언합니다.
required_access_grants D DG F M P 사용자 속성 값이 액세스 권한 부여와 일치하는 사용자로만 필드에 대한 액세스를 제한합니다.
required_fields D M 필드를 선택할 때 쿼리에 추가 필드를 추가해야 합니다.
sql_distinct_key M type: sum_distinct 또는 type: average_distinct 측정값이 계산될 고유 항목을 정의합니다.
값 및 형식 매개변수
case D SQL 조건에 따라 측정기준이 가질 수 있는 불연속 값 집합을 만듭니다.
default_value F P 필터 필드의 기본값을 지정합니다.
direction M 피벗을 사용할 때 type: percent_of_total 또는 type: running_total 측정값이 계산되는 방향을 결정합니다.
end_location_field D type: distance 필드의 종료 위치를 포함하는 필드를 정의합니다.
html D DG M Liquid 템플릿을 사용하여 필드의 HTML 출력을 수정합니다.
list_field M type: list의 측정값이 계산될 측정기준을 선언합니다.
percentile M type: percentile 또는 type: percentile_distinct 측정의 분수 값 (N번째 백분위수)을 지정합니다.
sql D DG M F 필드가 계산되는 방식을 결정합니다.
sql_end D DG 기간 유형 측정기준 그룹 또는 기간 유형 측정기준의 기간 종료 시간을 정의합니다.
sql_latitude D type: location 측정기준의 위도를 정의합니다.
sql_longitude D type: location 측정기준의 경도를 정의합니다.
sql_start D DG 기간 유형 측정기준 그룹 또는 기간 유형 측정기준의 기간 시작 시간을 정의합니다.
start_location_field D type: distance 필드의 시작 위치를 포함하는 필드를 정의합니다.
synonyms D DG F M P 대규모 언어 모델과 앱 개발자가 사용자가 필드를 언급할 수 있는 다른 방법을 이해하는 데 도움이 될 수 있는 문자열 동의어 (단어 또는 문구) 목록을 지정합니다.
tiers D type: tier 측정기준의 등급을 정의합니다.
type (측정기준, 필터 또는 매개변수) D F P 측정기준, 필터 또는 매개변수의 유형을 지정합니다.
type (측정기준 그룹용) DG 측정기준 그룹의 유형을 지정합니다.
type (측정값용) M 측정 유형을 지정합니다.
string_datatype D SQL Server 또는 MySQL의 type: string 필드의 유니코드 데이터 유형을 지정합니다.
units D type: distance 필드에 사용할 단위를 지정합니다.
value_format D M Excel 스타일 옵션을 사용하여 필드의 출력 형식을 지정합니다.
value_format_name D M 기본 제공 또는 맞춤 형식을 사용하여 필드의 출력 형식을 지정합니다.
시각화 매개변수
allow_fill D DG 측정기준에 측정기준 채우기가 허용되는지 여부를 확인합니다.
map_layer_name D 기본 제공 지도 또는 맞춤 지도에서 정의한 데이터 값과 지리적 지역 간의 매핑을 지정합니다.
피해야 할 매개변수
decimals D M 5.4에서 삭제됨 value_format로 대체됨
format D M 3.16에서 삭제됨 value_format로 대체됨