> ## Documentation Index
> Fetch the complete documentation index at: https://clickhouse.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# schema_inference_* 포맷 설정

> schema_inference_* 자동 생성 그룹의 ClickHouse 포맷 설정입니다.

export const SettingsInfoBlock = ({type, default_value, changeable_without_restart}) => {
  return <div className="not-prose" style={{
    display: "flex",
    flexWrap: "wrap",
    alignItems: "baseline",
    columnGap: "0.5rem",
    rowGap: "0.125rem",
    margin: "0.375rem 0",
    fontSize: "0.8125rem",
    lineHeight: "1.125rem"
  }}>
      <div style={{
    fontWeight: 600,
    opacity: 0.72
  }}>유형</div>
      <div style={{
    overflowWrap: "anywhere"
  }}>{type}</div>
      <div style={{
    fontWeight: 600,
    opacity: 0.72,
    marginInlineStart: "0.5rem"
  }}>기본값</div>
      <div style={{
    overflowWrap: "anywhere"
  }}>{default_value}</div>
      {changeable_without_restart && <div style={{
    fontWeight: 600,
    opacity: 0.72,
    marginInlineStart: "0.5rem"
  }}>
          재시작 없이 변경 가능
        </div>}
      {changeable_without_restart && <div style={{
    overflowWrap: "anywhere"
  }}>
          {changeable_without_restart}
        </div>}
    </div>;
};

이 설정은 [소스](https://github.com/ClickHouse/ClickHouse/blob/master/src/Core/FormatFactorySettings.h)에서 자동으로 생성됩니다.

<div id="schema_inference_hints">
  ## schema\_inference\_hints
</div>

스키마가 없는 포맷의 스키마 추론에서 힌트로 사용할 컬럼명과 타입 목록입니다.

예시:

쿼리:

```sql theme={null}
desc format(JSONEachRow, '{"x" : 1, "y" : "String", "z" : "0.0.0.0" }') settings schema_inference_hints='x UInt8, z IPv4';
```

결과:

```sql theme={null}
x   UInt8
y   Nullable(String)
z   IPv4
```

<Note>
  `schema_inference_hints`의 형식이 올바르지 않거나, 오타가 있거나, 데이터 타입이 잘못된 경우 등에는 전체 schema\_inference\_hints가 무시됩니다.
</Note>

<div id="schema_inference_make_columns_nullable">
  ## schema\_inference\_make\_columns\_nullable
</div>

<SettingsInfoBlock type="UInt64Auto" default_value="3" />

스키마 추론에서 추론된 타입을 `Nullable`로 만들지 여부를 제어합니다.
가능한 값:

* 0 - 추론된 타입은 `Nullable`이 되지 않습니다(이 경우 `NULL` 값을 어떻게 처리할지는 input\_format\_null\_as\_default로 제어하십시오),
* 1 - 모든 추론된 타입이 `Nullable`이 됩니다,
* 2 또는 `auto` - 스키마 추론 중 파싱된 샘플에 해당 컬럼의 `NULL`이 포함되어 있거나, 파일 메타데이터에 컬럼의 널 허용 여부 정보가 있는 경우에만 추론된 타입이 `Nullable`이 됩니다,
* 3 - 포맷이 해당 정보를 지원하는 경우(예: Parquet) 추론된 타입의 널 허용 여부는 파일 메타데이터와 일치하며, 그렇지 않은 경우(예: CSV)에는 항상 `Nullable`이 됩니다.

<div id="schema_inference_make_json_columns_nullable">
  ## schema\_inference\_make\_json\_columns\_nullable
</div>

<SettingsInfoBlock type="Bool" default_value="0" />

스키마 추론에서 추론된 JSON 타입을 `Nullable`로 만들도록 할지 제어합니다.
이 설정을 schema\_inference\_make\_columns\_nullable과 함께 활성화하면 추론된 JSON 타입이 `Nullable`이 됩니다.

<div id="schema_inference_mode">
  ## schema\_inference\_mode
</div>

<SettingsInfoBlock type="SchemaInferenceMode" default_value="default" />

스키마 추론 모드입니다. 'default' - 모든 파일의 스키마가 동일하다고 가정하며, 어떤 파일에서든 스키마를 추론할 수 있습니다. 'union' - 파일마다 서로 다른 스키마를 가질 수 있으며, 결과 스키마는 모든 파일 스키마의 합집합이 됩니다.
