...
Table of Contents | ||
---|---|---|
|
概要
データトランスフォーメーションモジュールは、日付やタイムスタンプフィールドから特定の日付要素を取得することのできる、ビルトインの日付コンポーネントステップを備えています。例えば、日付データから正確な曜日が必要な場合や、与えられた値を指定された月の再度の日付に変換しなくてはいけない場合は、このステップを使用することで、簡単にそのような関数を実行することができます。データトランスフォーメーションモジュールは、日付やタイムスタンプフィールドから特定の日付要素を抽出することのできる、ビルトイン日付コンポーネントステップを備えています。例えば、日付データから正確な曜日が必要な場合や、値を指定された月の最終日に変換しなくてはいけない場合は、こちらのステップを使用することで、簡単にそのような関数を実行することができます。
注意:これは、トランスフォーメーションステップパネルからアクセス可能なビルトインステップです。
注意:これは、トランスフォーメーションステップパネルからアクセス可能なビルトインステップです。
日付ステップ関数
こちらのステップは、異なる日付コンポーネントのタイプに関連する、様々な日付/時間関数を提供します。時間の関数を提供します。
日付日付コンポーネント | 関数 | 説明 | 例(元の書式:dd-mm-yyyy) | |||||
Year(年)年 | Year(年)年 |
Note: The data type of the output field will be changed to Date if it was Timestamp. | Original data: 21日付の年を返します。 注意:アウトプットフィールドのデータ型がタイムスタンプの場合は日付に変更されます。 | 元のデータ:21-05-2017 Output: 2017 | Year Start Date | Converts the date values to the first date of the year (that is, Jan 1st). Output field data type: Date | Original data: 21アウトプット:2017 | |
年開始日 | 日付の値を年の開始日(1月1日)に変換します。 アウトプットフィールドデータ型:日付 | 元のデータ:21-05-2017 Output: 01アウトプット:01-01-2017 | ||||||
Year End Date | Converts the date values to the last date of the year (that is, Dec 31st). Output field data type: Date | Original data: 21年最終日 | 日付の値を年の最終日(12月31日)に変換します。 アウトプットフィールドデータ型:日付 | 元のデータ:21-05-2017 Output: 31アウトプット:31-12-2017 | ||||
Quarter四半期 | Quarter | Displays the quarter of the date field in numeric form. Output field data type: Numeric | Original data: 21四半期 | 日付フィールドの四半期を数値形式で表示します。 アウトプットフィールドデータ型:数値 | 元のデータ:21-04-2017 Output: 2 | Quarter - Ordinal | Returns the quarter rank of the date field as an ordinal number. Output field data type: Text | Original data: 21アウトプット:2 |
四半期(1st~4th) | 日付フィールドの四半期順序を序数として返します。 アウトプットフィールドデータ型:テキスト | 元のデータ:21-04-2017 Output: 2nd | Quarter - Prefixed | Returns the quarter rank of the date field. Output field data type: Text | Original data: 21アウトプット:2nd | |||
四半期(Q1~Q4) | 日付フィールドの四半期順序を返します。 アウトプットフィールドデータ型:テキスト | 元のデータ:21-04-2017 Output: Q2アウトプット:Q2 | ||||||
Month月
| Month Name | Returns the month name of the given date. Output field data type: Text | Original data: 21月名 | 指定された日付の月名を返します。 アウトプットフィールドデータ型:テキスト | 元のデータ:21-04-2017 Output: April | Month Name - Short | Returns the abbreviated form of the month. Output field data type: Text. | Original data: 21アウトプット:April |
短い月名 | 月名を短縮形で返します。 アウトプットフィールドデータ型:テキスト | 元のデータ:21-04-2017 Output: Apr | Month Number | Returns the number of the specific date’s month. Output field data type: Numeric. | Original data: 21アウトプット:Apr | |||
月番号 | 特定の日付の月を数字で返します。 アウトプットフィールドデータ型:数値 | 元のデータ:21-04-2017 Output: 4 | Month Number - Ordinal | Returns the rank of the date month as an ordinal number. | Original date: 21アウトプット:4 | |||
月番号(序数) | 日付月の順序を序数として返します。 | 元の日付:21-04-2017 Output: 4th | Month Start Date | Converts the date values to the first date of the month (while retaining the original month and year values). Output field data type: Date | Original date: 21アウトプット:4th | |||
月開始日 | (元の月と年の値を維持したまま)日付の値を月の開始日に変換します。 アウトプットフィールドデータ型:日付 | 元の日付:21-04-2017 Output: 01アウトプット:01-04-2017 | ||||||
Month End Date | Converts the date to the last date of the month. Output field data type: Date | Original date: 06月最終日 | 日付を月の最終日に変換します。 アウトプットフィールドデータ型:日付 | 元の日付:06-02-2018 Output: 28アウトプット:28-02-2018 | ||||
Week週 | Week of Year | Returns the number of the week of the year. Output field data type: Numeric | Original date: 21週番号(年) | 年の週数を返します。 アウトプットフィールドデータ型:数値 | 元の日付:21-11-2017 Output: 47 | Week of Month | Returns the number of the week of the month. Output field data type: Numeric | Original date: 21アウトプット: |
週番号(月) | 月の週数を返します。 アウトプットフィールドデータ型:数値 | 元の日付:21-11-2017 Output: 4 | Week Start Date | Changes the date to the start date of the week. This function will determine the week of the given date, and change the date to the first day of that week, assuming that the week starts on a Sunday.) Output field data type: Date | Original date: 30アウトプット:4 | |||
週開始日 | 日付を週の開始日に変更します。こちらの関数は指定された日付の週を判断し、週は日曜日から開始する前提で、日付を週の開始日に変更します。 アウトプットフィールドデータ型:日付 | 元の日付:30-11-2017 Output: 26アウトプット:26-11-2017 | Week End Date | |||||
Changes the date to the end date of the week. This function will determine the week of the given date, and change the date to the last day of that week, assuming that the week ends on a Saturday.) Output field data type: Date | Original date: 30週最終日 | 日付を週の最終日に変更します。こちらの関数は指定された日付の週を判断し、週は土曜日で終了する前提で、日付を週の終了日に変更します。 アウトプットフィールドデータ型:日付 | 元のデータ:30-11-2017 Output: 02アウトプット:02-12-2017 | |||||
Day曜日 | Day Name | Returns the full name of the day of a given date. Output field data type: Text | Original date: 30曜日名 | 指定された日付の完全な曜日名を返します。 アウトプットフィールドデータ型:テキスト | 元の日付:30-11-2017 Output: Thursday | Day Name - Short | Returns the shorter version of the day name of a given date. Output field data type: Text | Original date: 30アウトプット:Thursday |
短い曜日名 | 指定された日付の曜日名の短縮形を返します。 アウトプットフィールドデータ型:テキスト | 元の日付:30-11-2017 Output: Thu | Day of Week | This determines the day of the week of a given date and returns its number. Output field data type: Numeric | Original date: 30アウトプット:Thu | |||
曜日番号 | 指定された日付の週の日数を判断し、その数字を返します。 アウトプットフィールドデータ型:数値 | 元の日付:30-11-2017 Output: 5 | Day of Week - Ordinal | This determines the day of the week of a given date and returns ordinal number. Output field data type: Text | Original date: 30アウトプット:5 | |||
曜日番号(序数) | 指定された日付の週の日数を判断し、序数を返します。 アウトプットフィールドデータ型:テキスト | 元の日付:30-11-2017 Output: 5th | Day of Month | This determines the day of the month of a given date and returns it’s number. Output field data type: Numeric | Original date: 11アウトプット:5th | |||
日(月の日付) | 指定された日付の月の日数を判断し、その数字を返します。 アウトプットフィールドデータ型:数値 | 元の日付:11-04-2017 Output: 11 | Day of Year | This determines the day of the year of a given date and returns its number. Output field data type: Numeric | Original date: 11アウトプット:11 | |||
日(通年) | 指定された日付の年の日数を判断し、その数字を返します。 アウトプットフィールドデータ型:数値 | 元の日付:11-04-2017 Output: 101アウトプット:101 | ||||||
Time (Only appears if your data has a timestamp) | Hour (AM/PM) | Returns the hour in the form of the 12-hour clock (that is with AM or PM). Output field data type: Text | 時間 (データにタイムスタンプが含まれる場合にのみ表示されます) | 時間(午前/午後) | (AM、またはPM表記とともに)12時間形式で時刻を返します。 アウトプットフィールドデータ型:テキスト | 元の値:11-04-2018 06:37:00:17 Output: 6 アウトプット:6 AM | Hour | Returns only the hour of the given timestamp. Output field data type: Numeric |
Original value: 11時間 | 指定されたタイムスタンプの時間のみを返します。 アウトプットフィールドデータ型:数値 | 元の値:11-04-2018 06:37:00.008 Output: 6アウトプット:6 | Minute | Returns the minute of the given timestamp. Output field data type: Numeric | ||||
Original value: 11分 | 指定されたタイムスタンプの分を返します。 アウトプットフィールドデータ型:数値 | 元の値:11-04-2018 06:37:00.008Output: 37 アウトプット:37 | Second | Returns the second of the given timestamp. Output field data type: Second | ||||
Original value: 11秒 | 指定されたタイムスタンプの秒を返します。 アウトプットフィールドデータ型:秒 | 元の値:11-04-2018 06:37:00.008 Output: 0アウトプット:0 | Millisecond | Returns the millisecond of the given timestamp. Output field data type: | ||||
Original value: 11ミリ秒 | 指定されたタイムスタンプのミリ秒を返します。 アウトプットフィールドデータ型: | 元の値:11-04-2018 06:37:00.008 アウトプット:8Output: 8 |
ステップ設定
日付コンポーネントステップを設定し、日付要素を抽出するには、以下の手順に従います。
- 日付、または時間の関数を実行するには、フローに日付、またはタイムスタンプフィールドが含まれていなくてはいけません。フローで日付コンポーネントステップを使用する準備ができたら、以下の手順を実行します。
- トランスフォーメーションフロービルダーの画面左側でトランスフォーメーションステップを展開し、「日付コンポーネント」ステップをキャンバスにドラッグします。
- このステップを、フロー内の前のステップと接続します。これにより、ステップの設定詳細が右側のパネルに表示されます。
- 「日付フィールド」ドロップダウンリストから、日付関数を適用する日付カラム(列)フィールドを選択します。
- 「日付関数」ドロップダウンから、日付コンポーネントを選択します。これにより、書式ドロップダウンリストは、このコンポーネントに関連するすべての関数を表示するよう更新されます。
- 更新された「書式」ドロップダウンから、日付データで実行する関数を選択します。利用可能なすべての関数については、上記の一覧を参照してください。
- 「適用」をクリックします。データプレビューパネルに、このステップの結果とともに新しいカラム(列)が表示されます。(注意:アウトプットカラム(列)の名前とデータ型は、適用された関数に基づきます。)以下の例では、タイムスタンプから取得されたミリ秒の結果を表示しています。