Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
毎日実行される豚のジョブの 1 つで、出力ファイルのパスに今日の日付を使用したいのですが、それを行う方法はありますか。何かのようなもの /user/x/$todaysDate
/user/x/$todaysDate
これをbash経由で行います:
echo '/user/x/'`date +%Y-%m-%d`
与える:
/user/x/2012-10-14
したがって、スクリプトは次のように実行します。
$ pig -param outpath='/user/x/'`date +%Y-%m-%d` myscript.pig
次に、STOREコマンドで次を使用し$outpathます。
STORE
$outpath
STORE abc INTO '$outpath';