Browse Source

Add example edp jobs folder and pig example

Change-Id: I30643876e7724b62b8f13a0d65a0b78fde26efcd
Nadya Privalova 5 years ago
parent
commit
cb779b6b7d

+ 4
- 0
edp-examples/README.rst View File

@@ -0,0 +1,4 @@
1
+EDP Examples
2
+============
3
+
4
+* Pig job example - trim spaces in input file

+ 4
- 0
edp-examples/pig-job/README.rst View File

@@ -0,0 +1,4 @@
1
+Example Pig job
2
+===============
3
+
4
+This script trims spaces in input text

+ 3
- 0
edp-examples/pig-job/example.pig View File

@@ -0,0 +1,3 @@
1
+A = load '$INPUT' using PigStorage(':') as (fruit: chararray);
2
+B = foreach A generate com.hadoopbook.pig.Trim(fruit);
3
+store B into '$OUTPUT' USING PigStorage();

+ 4
- 0
edp-examples/pig-job/expected_output View File

@@ -0,0 +1,4 @@
1
+pomegranate
2
+banana
3
+apple
4
+lychee

+ 4
- 0
edp-examples/pig-job/input View File

@@ -0,0 +1,4 @@
1
+   pomegranate
2
+      banana
3
+  apple
4
+   lychee

BIN
edp-examples/pig-job/udf.jar View File


Loading…
Cancel
Save