...
Table of Contents | ||
---|---|---|
|
概要
データトランスフォーメーションモジュールは、日付やタイムスタンプフィールドから特定の日付要素を取得することのできる、ビルトインの日付コンポーネントステップを備えています。例えば、日付データから正確な曜日が必要な場合や、与えられた値を指定された月の再度の日付に変換しなくてはいけない場合は、このステップを使用することで、簡単にそのような関数を実行することができます。データトランスフォーメーションモジュールは、日付やタイムスタンプフィールドから特定の日付要素を取得することのできる、ビルトインDate Component(日付コンポーネント)ステップを備えています。例えば、日付データから正確な曜日が必要な場合や、値を指定された月の最終日に変換しなくてはいけない場合は、こちらのステップを使用することで、簡単にそのような関数を実行することができます。
注意:これは、トランスフォーメーションステップパネルからアクセス可能なビルトインステップです。
注意:これは、トランスフォーメーションステップパネルからアクセス可能なビルトインステップです。
日付ステップ関数
こちらのステップは、異なる日付コンポーネントのタイプに関連する、様々な日付こちらのステップは、異なるdate component(日付コンポーネント)のタイプに関連する、様々な日付/時間関数を提供します。時間の関数を提供します。
日付Date Component(日付コンポーネント) | 関数 | 説明 | 例(元の書式: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-2017Output: 2017アウトプット: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: 21Date(年開始日) | 日付の値を年の開始日(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: 21Date(年終了日) | 日付の値を年の終了日(12月31日)に変換します。 アウトプットフィールドデータ型:日付 | 元のデータ:21-05-2017 Output: 31アウトプット:31-12-2017 | |||
QuarterQuarter(四半期) | Quarter | Displays the quarter of the date field in numeric form. Output field data type: Numeric | Original data: 21Quarter(四半期) | 日付フィールドの四半期を数値形式で表示します。 アウトプットフィールドデータ型:数値 | 元のデータ:21-04-2017 Output: 2アウトプット:2 | ||
Quarter - Ordinal(四半期 - Ordinal | Returns the quarter rank of the date field as an ordinal number. Output field data type: Text | Original data: 21序数) | 日付フィールドの四半期順序を序数として返します。 アウトプットフィールドデータ型:テキスト | 元のデータ:21-04-2017 Output: 2ndアウトプット:2nd | |||
Quarter - Prefixed(四半期 - Prefixed | Returns the quarter rank of the date field. Output field data type: Text | Original data: 21接頭辞) | 日付フィールドの四半期順序を返します。 アウトプットフィールドデータ型:テキスト | 元のデータ:21-04-2017 Output: Q2アウトプット:Q2 | |||
MonthMonth(月)
| Month Name | Returns the month name of the given date. Output field data type: Text | Original data: 21Name(月名) | 指定された日付の月名を返します。 アウトプットフィールドデータ型:テキスト | 元のデータ:21-04-2017 Output: Aprilアウトプット:April | ||
Month Name - Short(月名 - Short | Returns the abbreviated form of the month. Output field data type: Text. | Original data: 21短縮) | 月の短縮形を返します。 アウトプットフィールドデータ型:テキスト | 元のデータ:21-04-2017 Output: Aprアウトプット:Apr | |||
Month Number | Returns the number of the specific date’s month. Output field data type: Numeric. | Original data: 21Number(月の数字) | 特定の日付の月を数字で返します。 アウトプットフィールドデータ型:数値 | 元のデータ:21-04-2017 Output: 4アウトプット:4 | |||
Month Number - Ordinal | Returns the rank of the date month as an ordinal number. | Original date: 21Ordinal(月の数字 - 序数) | 日付月の順番を序数として返します。 | 元の日付:21-04-2017 Output: 4thアウトプット: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: 21Date(月開始日) | (元の月と年の値を維持したまま)日付の値を月の開始日に変換します。 アウトプットフィールドデータ型:日付 | 元の日付: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: 06Date(月終了日) | 日付を月の終了日に変換します。 アウトプットフィールドデータ型:日付 | 元の日付:06-02-2018 Output: 28アウトプット:28-02-2018 | |||
WeekWeek(週) | Week of Year | Returns the number of the week of the year. Output field data type: Numeric | Original date: 21Year(年の週数) | 年の週数を返します。 アウトプットフィールドデータ型:数値 | 元の日付:21-11-2017 Output: 47アウトプット:47 | ||
Week of Month | Returns the number of the week of the month. Output field data type: Numeric | Original date: 21Month(月の週数) | 月の週数を返します。 アウトプットフィールドデータ型:数値 | 元の日付:21-11-2017 Output: 4アウトプット: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: 30Date(週開始日) | 日付を週の開始日に変更します。こちらの関数は指定された日付の週を判断し、週は日曜日から開始する前提で、日付を週の開始日に変更します。 アウトプットフィールドデータ型:日付 | 元の日付: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: 30Date(週終了日) | 日付を週の終了日に変更します。こちらの関数は指定された日付の週を判断し、週は土曜日で終了する前提で、日付を週の終了日に変更します。 アウトプットフィールドデータ型:日付 | 元のデータ:30-11-2017 Output: 02アウトプット:02-12-2017 | |||
DayDay(曜日) | Day Name | Returns the full name of the day of a given date. Output field data type: Text | Original date: 30Name(曜日名) | 指定された日付の完全な曜日名を返します。 アウトプットフィールドデータ型:テキスト | 元の日付:30-11-2017 Output: Thursdayアウトプット:Thursday | ||
Day Name - Short(曜日名 - Short | Returns the shorter version of the day name of a given date. Output field data type: Text | Original date: 30短縮) | 指定された日付の曜日名の短縮形を返します。 アウトプットフィールドデータ型:テキスト | 元の日付:30-11-2017 Output: Thuアウトプット: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: 30Week(週の日数) | 指定された日付の週の日数を判断し、その数字を返します。 アウトプットフィールドデータ型:数値 | 元の日付:30-11-2017 Output: 5アウトプット:5 | |||
Day of Week - Ordinal(週の日数 - Ordinal | This determines the day of the week of a given date and returns ordinal number. Output field data type: Text | Original date: 30序数) | 指定された日付の週の日数を判断し、序数を返します。 アウトプットフィールドデータ型:テキスト | 元の日付:30-11-2017 Output: 5thアウトプット: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: 11Month(月の日数) | 指定された日付の月の日数を判断し、その数字を返します。 アウトプットフィールドデータ型:数値 | 元の日付:11-04-2017 Output: 11アウトプット: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: 11Year(年の日数) | 指定された日付の年の日数を判断し、その数字を返します。 アウトプットフィールドデータ型:数値 | 元の日付:11-04-2017 Output: 101アウトプット:101 | |||
Time (Only appears if your data has a timestamp)Time(時間) (データにタイムスタンプが含まれる場合にのみ表示されます) | 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 | Original value:(時(AM/PM)) | (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:Hour(時) | 指定されたタイムスタンプの時のみを返します。 アウトプットフィールドデータ型:数値 | 元の値: 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:Minute(分) | 指定されたタイムスタンプの分を返します。 アウトプットフィールドデータ型:数値 | 元の値: 11-04-2018 06:37:00.008Output: 37 アウトプット:37 | Second | Returns the second of the given timestamp. Output field data type: Second | |||
Original value:Second(秒) | 指定されたタイムスタンプの秒を返します。 アウトプットフィールドデータ型:秒 | 元の値: 11-04-2018 06:37:00.008 Output: 0アウトプット:0 | Millisecond | Returns the millisecond of the given timestamp. Output field data type: | |||
Original value:Millisecond(ミリ秒) | 指定されたタイムスタンプのミリ秒を返します。 アウトプットフィールドデータ型: | 元の値: 11-04-2018 06:37:00.008 アウトプット:8Output: 8 |
ステップ設定
Date Component(日付コンポーネント)ステップを設定し、日付要素を取得するには、以下の手順に従います。
- 日付、または時間の関数を実行するには、フローに日付、またはタイムスタンプフィールドが含まれていなくてはいけません。フローでDate Component(日付コンポーネント)ステップを使用する準備ができたら、以下の手順を実行します。
- トランスフォーメーションフロービルダーの画面左側でトランスフォーメーションステップを展開し、「Date Component(日付コンポーネント)」ステップをキャンバスにドラッグします。
- このステップを、フロー内の前のステップと接続します。これにより、ステップの設定詳細が右側のパネルに表示されます。
- 「Date Field(日付フィールド)」ドロップダウンリストから、日付関数を適用する日付カラム(列)フィールドを選択します。
- 「Date Function(日付関数)」ドロップダウンから、Date Component(日付コンポーネント)を選択します。これにより、Format(書式)ドロップダウンリストは、このコンポーネントに関連するすべての関数を表示するよう更新されます。
- 更新された「Format(書式)」ドロップダウンから、日付データで実行する関数を選択します。利用可能なすべての関数については、上記の一覧を参照してください。
- 「適用」をクリックします。データプレビューパネルに、このステップの結果とともに新しいカラム(列)が表示されます。(注意:アウトプットカラム(列)の名前とデータ型は、適用された関数に基づきます。)以下の例では、タイムスタンプから取得されたミリ秒の結果を表示しています。