LoginSignup
1
2

More than 5 years have passed since last update.

oozieのcoordinatorでworkflowのプロパティに日付を動的に渡す方法

Last updated at Posted at 2015-06-19

本日の日付の場合はプロパティの値に以下をセット
${coord:formatTime(coord:actualTime(), 'yyyy-MM-dd')}

日付をずらしたい場合は以下のように(1日前の日付の例)
${coord:formatTime(coord:dateOffset(coord:actualTime(), -1, 'DAY'), 'yyyy-MM-dd')}

actualTimeはUTCの時間取ることに注意

時間を取る関数はactualTimeのほかにnominalTime()もある。
acutualTimeはいかなる時も実行する時間(UTC)が取れるが、nominalTime()にしておくと、実行が失敗した際に、後日再実行すると実行が失敗した時間が取得出来る。

1
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
2