1

データサイズが原因で、Apache Pig を使用して処理する必要があるタブ区切りのデータ入力があります。データを正常にロードして分析しましたが、タプルを保存するのではなく、出力を元の形式でファイルに保存したいと考えています。

Sample Input
A \t B
A \t B

Sample Output
A \t B
A \t B

(A,B),(A,B) の代わりに

 Store D into 'output' using PigStorage('\n')

問題はどこですか?

4

1 に答える 1

0

タブ区切りの入力をロードしましたが、改行 (\n)区切りで書き戻しています。

試す:

Store D into 'output' using PigStorage('\t');

また

Store D into 'output' using PigStorage(); -- tab is the default delimiter

出力の特定の形式については、 flatten [1] 演算子を調べることをお勧めします。

[1] http://pig.apache.org/docs/r0.7.0/piglatin_ref2.html#Flatten+Operator

于 2012-07-10T14:48:02.917 に答える