

翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。

# サポートされているデータ型と値
<a name="supported-data-types-and-values"></a>

Amazon Quick Sight は現在、、`Date`、`Decimal`、`Integer`および のプリミティブデータ型をサポートしています`String`。次のデータ型は、SPICE、`Date`、`Decimal-fixed`、`Decimal-float`、`Integer`、`String` でサポートされています。Quick Sight は、ブール値を整数に昇格させることで受け入れます。また、地理空間のデータ型から引き出すこともできます。地理空間データ型は、メタデータを使用して物理データ型を解釈します。緯度と経度は数値です。その他のすべての地理空間カテゴリは文字列です。

データソースとして使用するテーブルまたはファイルには、これらのデータ型に暗黙的に変換できるフィールドのみが含まれるようにします。Amazon Quick Sight は、変換できないフィールドや列をスキップします。「フィールドは、サポートされていないデータ型を使用しているため、スキップされました。」というエラーが表示された場合は、クエリまたはテーブルを変更し、サポートされていないデータ型を削除または予測します。

## 文字列とテキストデータ
<a name="strings"></a>

文字を含むフィールドまたは列は、*文字列*と呼ばれます。データ型のフィールド `STRING` は、最初はほぼすべての型のデータを含むことができます。例としては、名前、説明、電話番号、アカウント番号、JSON データ、都市、郵便番号、日付、計算に使用できる数字などがあります。これらの型は、一般的な意味でテキストデータと呼ばれることがありますが、技術的な意味では呼ばれません。Quick Sight は、データセット列のバイナリラージオブジェクトとキャラクターラージオブジェクト (BLOBsをサポートしていません。Quick Sight ドキュメントでは、「text」という用語は常に「string data」を意味します。

データを初めてクエリまたはインポートすると、Quick Sight は、日付や数値など、他のタイプとして識別されたデータを解釈しようとします。フィールドまたは列に割り当てられたデータ型が正しいことを、確認すると良いでしょう。

インポートされたデータの文字列フィールドごとに、Quick Sight は 8 バイトのフィールド長と UTF-8 でエンコードされた文字長を使用します。Amazon Quick Sight は UTF-8 ファイルエンコーディングをサポートしていますが、UTF-8 (BOM を使用) はサポートしていません。

## 日付と時刻のデータ
<a name="dates"></a>

データ型 `Date` を持つフィールドには時間データも含まれ、`Datetime` フィールドとしても知られています。Quick Sight は、[サポートされている日付形式を使用する日付](#supported-date-formats)と時刻をサポートしています。

Quick Sight は、日付データのクエリ、フィルタリング、表示に UTC 時間を使用します。日付データがタイムゾーンを指定しない場合、Quick Sight は UTC 値を引き受けます。日付データがタイムゾーンを指定すると、Quick Sight はそれを UTC 時間で表示するように変換します。たとえば、 のようなタイムゾーンオフセットを持つ日付フィールド**2015-11-01T03:00:00-08:00**は UTC に変換され、Amazon Quick Sight に として表示されます**2015-11-01T15:30:00**。

インポートされたデータの`DATE`フィールドごとに、Quick Sight は 8 バイトのフィールド長を使用します。Quick Sight は UTF-8 ファイルエンコーディングをサポートしていますが、UTF-8 (BOM を使用) はサポートしていません。

## 数値データ
<a name="numeric"></a>

数値データには、整数と小数が含まれます。データ型 `INT` の整数は、小数点以下の桁を持たない負または正の数です。Quick Sight は、大きい整数と小さい整数を区別しません。値を超える整数 `9007199254740991` または `2^53 - 1` は、ビジュアルに正確に、または正しく表示されないことがあります。

データ型 `Decimal` の小数は、小数点の前後に小数位が少なくとも 1 つ含まれている負または正の数です。ダイレクトクエリモードを選択すると、すべての非整数 10 進数型が `Decimal` としてマークされ、基盤となるエンジンは、データソースのサポートされている動作に基づいてデータポイントの精度を処理します。サポートされているデータソースのタイプの詳細については、「[サポートされているデータ型と値](#supported-data-types-and-values)」を参照してください。

データセットを に保存する場合SPICE、10 進値を `fixed`または 10 `float`進タイプとして保存できます。 `Decimal-fixed` データ型は、合計 18 桁、小数点以下 4 桁まで使用できる 10 進数 (`18,4`) の形式を使用します。 `Decimal-fixed` データ型は正確な数学演算を実行するのに適していますが、Quick Sight は、値が に取り込まれるときに値を最も近い 10,000 位に四捨五入しますSPICE。

`Decimal-float` データ型は、値に対して約 16 有効桁の精度を提供します。有効桁は、小数点以下の桁数が多い数値と非常に大きい数値を同時にサポートするために、小数点のいずれの側にも適用できます。例えば、`Decimal-float` データ型は、数値 `12345.1234567890` または数値 `1234567890.12345` をサポートします。`0` に近い非常に小さな数値を扱う場合、`Decimal-float` データ型は小数点の右側で最大 15 桁までサポートします (例: `0.123451234512345`)。このデータ型がサポートする最大値は `1.8 * 10^308` です。これは、データセットでのオーバーフローエラーの発生確率を最小限に抑えるためです。

`Decimal-float` データ型は不正確で、一部の値は実際の値ではなく、近似値として保存されます。これにより、特定の値を保存したり、返したりするときに、わずかな不一致が生じる可能性があります。`Decimal-float` データ型には次の考慮事項が適用されます。
+ 使用しているデータセットが Amazon S3 データソースからのものである場合、SPICE はすべての 10 進数の値に `Decimal-float` の 10 進数型を割り当てます。
+ 使用しているデータセットがデータベースからのものである場合、SPICE はデータベース内で値が割り当てられている 10 進数型を使用します。例えば、データベース内で値に固定小数点の数値が割り当てられている場合、その値は SPICE の `Decimal-fixed` 型になります。

`Decimal-float` データ型に変換できるフィールドを含む既存の SPICE データセットの場合、**[データセットを編集]** ページにポップアップが表示されます。既存のデータセットのフィールドを `Decimal-float` データ型に変換するには、**[フィールドを更新]** を選択します。オプトインしたくない場合は、**[フィールドを更新しない]** を選択します。データセットが保存および公開されるまで、**[データセットを編集]** ページを開くたびに **[フィールドを更新]** のポップアップが表示されます。

## サポートされる外部データソースのデータ型
<a name="supported-data-types"></a>

次の表に、Amazon Quick Sight で次のデータソースを使用する場合にサポートされるデータ型を示します。


****  

| データベースエンジンまたはソース | 数値データ型 | 文字列データ型 | 日時データ型 | ブールデータ型 | 
| --- | --- | --- | --- | --- | 
|   **Amazon Athena、Presto、Starburst、Trino**  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/quick/latest/userguide/supported-data-types-and-values.html)  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/quick/latest/userguide/supported-data-types-and-values.html)  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/quick/latest/userguide/supported-data-types-and-values.html)  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/quick/latest/userguide/supported-data-types-and-values.html)  | 
|  **Amazon Aurora**、**MariaDB**、**MySQL**  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/quick/latest/userguide/supported-data-types-and-values.html)  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/quick/latest/userguide/supported-data-types-and-values.html)  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/quick/latest/userguide/supported-data-types-and-values.html)  |  | 
|   **Amazon OpenSearch Service**  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/quick/latest/userguide/supported-data-types-and-values.html)  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/quick/latest/userguide/supported-data-types-and-values.html)  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/quick/latest/userguide/supported-data-types-and-values.html)  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/quick/latest/userguide/supported-data-types-and-values.html)  | 
|  **Oracle**  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/quick/latest/userguide/supported-data-types-and-values.html) | [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/quick/latest/userguide/supported-data-types-and-values.html) | [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/quick/latest/userguide/supported-data-types-and-values.html) | bit | 
|   **[PostgreSQL]**   |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/quick/latest/userguide/supported-data-types-and-values.html)  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/quick/latest/userguide/supported-data-types-and-values.html)  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/quick/latest/userguide/supported-data-types-and-values.html)  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/quick/latest/userguide/supported-data-types-and-values.html)  | 
|   **Apache Spark**  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/quick/latest/userguide/supported-data-types-and-values.html)  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/quick/latest/userguide/supported-data-types-and-values.html)  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/quick/latest/userguide/supported-data-types-and-values.html)  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/quick/latest/userguide/supported-data-types-and-values.html)  | 
|   **Snowflake**   |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/quick/latest/userguide/supported-data-types-and-values.html)  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/quick/latest/userguide/supported-data-types-and-values.html)  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/quick/latest/userguide/supported-data-types-and-values.html)  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/quick/latest/userguide/supported-data-types-and-values.html)  | 
|   **Microsoft SQL Server**   |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/quick/latest/userguide/supported-data-types-and-values.html)  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/quick/latest/userguide/supported-data-types-and-values.html)  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/quick/latest/userguide/supported-data-types-and-values.html)  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/quick/latest/userguide/supported-data-types-and-values.html)  | 

### サポートされている日付形式
<a name="supported-date-formats"></a>

Amazon Quick Sight は、このセクションで説明されている日付と時刻の形式をサポートしています。Amazon Quick Sight にデータを追加する前に、日付形式に互換性があるかどうかを確認します。サポートされていない形式を使用する必要がある場合は、「[サポートされていない日付またはカスタム日付の使用](using-unsupported-dates.md)」を参照してください。

サポートされている形式は、データソースのタイプに応じて以下のように異なります。


| データソース | クロック | 日付の書式 | 
| --- | --- | --- | 
|  ファイルのアップロード Amazon S3 ソース Athena Salesforce  |  24 時間制と 12 時間制の両方  |  サポートされている日付と時刻の形式は、Joda APIのドキュメントに記載されています。 Joda 日付書式の一覧については、Joda ウェブサイトの「[Class DateTimeFormat](http://www.joda.org/joda-time/apidocs/org/joda/time/format/DateTimeFormat.html)」を参照してください。 メモリ (SPICE) に保存されているデータセットの場合、Amazon Quick Sight は `Jan 1, 0001 00:00:00 UTC`～ の範囲の日付をサポートします`Dec 31, 9999, 23:59:59 UTC`。  | 
|  リレーショナルデータベースソース  |  24 時間制のみ  |  次のデータおよび時刻の形式: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/quick/latest/userguide/supported-data-types-and-values.html)  | 

### データでサポートされていない値
<a name="unsupported-data-values"></a>

フィールドに Amazon Quick Sight がフィールドに割り当てるデータ型に準拠しない値が含まれている場合、それらの値を含む行はスキップされます。例えば、以下のソースデータがあるとします。

```
Sales ID    Sales Date    Sales Amount
--------------------------------------
001        10/14/2015        12.43
002        5/3/2012          25.00
003        Unknown           18.17
004        3/8/2009          86.02
```

Amazon Quick Sight は日付フィールド**Sales Date**として解釈し、日付以外の値を含む行を削除するため、次の行のみがインポートされます。

```
Sales ID    Sales Date    Sales Amount
--------------------------------------
001        10/14/2015        12.43
002        5/3/2012          25.00
004        3/8/2009          86.02
```

場合によっては、JDBC ドライバがソースデータベースエンジンに対して解釈できない値がデータベースフィールドに含まれていることがあります。このような場合、解釈不能な値は null に置き換えられ、行をインポートできます。この問題が発生することがわかっているのは、MySQL の日付、日時、およびタイムスタンプのフィールドで値がすべてゼロである (例: **0000-00-00 00:00:00**) 場合だけです。例えば、以下のソースデータがあるとします。

```
Sales ID    Sales Date                Sales Amount
---------------------------------------------------
001        2004-10-12 09:14:27        12.43
002        2012-04-07 12:59:03        25.00
003        0000-00-00 00:00:00        18.17
004        2015-09-30 01:41:19        86.02
```

この場合、以下のデータがインポートされます。

```
Sales ID    Sales Date                Sales Amount
---------------------------------------------------
001        2004-10-12 09:14:27        12.43
002        2012-04-07 12:59:03        25.00
003        (null)                     18.17
004        2015-09-30 01:41:19        86.02
```