> ## 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.

# RowBinaryWithNamesAndTypes

> RowBinaryWithNamesAndTypes フォーマットに関するドキュメント

| 入力 | 出力 | エイリアス |
| - | - | - |
| ✔ | ✔ | |

## 説明

[RowBinary](https://clickhouse.com/docs/ja/reference/formats/RowBinary/RowBinary.md) フォーマットと似ていますが、ヘッダーが追加されています。

* カラム数 (N) を [`LEB128`](https://en.wikipedia.org/wiki/LEB128) でエンコードした値。
* カラム名を指定する N 個の `String`。
* カラムの型を指定する N 個の `String`。

## 使用例

## フォーマット設定

以下の設定は、すべての `RowBinary` 系フォーマットに共通です。

| 設定 | 説明 | デフォルト |
| - | - | - |
| [`format_binary_max_string_size`](https://clickhouse.com/docs/ja/reference/settings/formats/format-binary#format_binary_max_string_size) | RowBinary フォーマットで許可される String の最大サイズです。 | `1GiB` |
| [`output_format_binary_encode_types_in_binary_format`](https://clickhouse.com/docs/ja/reference/settings/formats/output-format#output_format_binary_encode_types_in_binary_format) | [`RowBinaryWithNamesAndTypes`](https://clickhouse.com/docs/ja/reference/formats/RowBinary/RowBinaryWithNamesAndTypes) 出力フォーマットで、ヘッダー内の型を、型名の文字列ではなく [`binary encoding`](https://clickhouse.com/docs/ja/reference/data-types/data-types-binary-encoding) を使って書き込めるようにします。 | `false` |
| [`input_format_binary_decode_types_in_binary_format`](https://clickhouse.com/docs/ja/reference/settings/formats/input-format#input_format_binary_decode_types_in_binary_format) | [`RowBinaryWithNamesAndTypes`](https://clickhouse.com/docs/ja/reference/formats/RowBinary/RowBinaryWithNamesAndTypes) 入力フォーマットで、ヘッダー内の型を、型名の文字列ではなく [`binary encoding`](https://clickhouse.com/docs/ja/reference/data-types/data-types-binary-encoding) を使って読み取れるようにします。 | `false` |
| [`output_format_binary_write_json_as_string`](https://clickhouse.com/docs/ja/reference/settings/formats/output-format#output_format_binary_write_json_as_string) | [`RowBinary`](https://clickhouse.com/docs/ja/reference/formats/RowBinary/RowBinary) 出力フォーマットで、[`JSON`](https://clickhouse.com/docs/ja/reference/data-types/newjson) データ型の値を `JSON` [String](https://clickhouse.com/docs/ja/reference/data-types/string.md) 値として書き込めるようにします。 | `false` |
| [`input_format_binary_read_json_as_string`](https://clickhouse.com/docs/ja/reference/settings/formats/input-format#input_format_binary_read_json_as_string) | [`RowBinary`](https://clickhouse.com/docs/ja/reference/formats/RowBinary/RowBinary) 入力フォーマットで、[`JSON`](https://clickhouse.com/docs/ja/reference/data-types/newjson) データ型の値を `JSON` [String](https://clickhouse.com/docs/ja/reference/data-types/string.md) 値として読み取れるようにします。 | `false` |

> [!NOTE]
>
> 設定 [`input_format_with_names_use_header`](https://clickhouse.com/docs/ja/reference/settings/formats/input-format#input_format_with_names_use_header) が 1 に設定されている場合、
> 入力データのカラムは名前に基づいてテーブルのカラムに対応付けられ、設定 [input\_format\_skip\_unknown\_fields](https://clickhouse.com/docs/ja/reference/settings/formats/input-format.md#input_format_skip_unknown_fields) が 1 に設定されていれば、不明な名前のカラムはスキップされます。
> それ以外の場合は、最初の行がスキップされます。
> 設定 [`input_format_with_types_use_header`](https://clickhouse.com/docs/ja/reference/settings/formats/input-format#input_format_with_types_use_header) が `1` に設定されている場合、
> 入力データの型は、テーブル内の対応するカラムの型と比較されます。それ以外の場合は、2 行目がスキップされます。
