Permalink
Browse files

More Hive example files.

  • Loading branch information...
1 parent 97376f3 commit 98159e9b1551e7fd81b80004ab86a48cc5606ff7 @tomwhite committed Jun 28, 2010
View
@@ -92,7 +92,7 @@
<mkdir dir="${classes.dir}"/>
- <javac destdir="${classes.dir}" debug="true" deprecation="false" optimize="false" failonerror="true" includes="${src.includes}" excludes="ch12/">
+ <javac destdir="${classes.dir}" debug="true" deprecation="false" optimize="false" failonerror="true" includes="${src.includes}" excludes="ch11/,ch12/">
<src path="${src.dir}"/>
<classpath refid="classpath"/>
</javac>
@@ -132,7 +132,7 @@
<jar destfile="pig.jar" basedir="${classes.dir}"/>
</target>
- <target name="hive" depends="compile" description="Creates a jar containing Hiveß UDFs.">
+ <target name="hive" depends="compile" description="Creates a jar containing Hive UDFs.">
<jar destfile="hive.jar" basedir="${classes.dir}"/>
</target>
@@ -0,0 +1 @@
+1Log line 1
@@ -0,0 +1 @@
+2Log line 2
@@ -0,0 +1 @@
+3Log line 3
@@ -0,0 +1 @@
+4Log line 4
@@ -0,0 +1 @@
+5Log line 5
@@ -0,0 +1 @@
+6Log line 6
No changes.
@@ -1,10 +1,32 @@
CREATE TABLE logs (ts BIGINT, line STRING)
PARTITIONED BY (dt STRING, country STRING);
-LOAD DATA LOCAL INPATH 'input/hive/tables/file1'
+LOAD DATA LOCAL INPATH 'input/hive/partitions/file1'
INTO TABLE logs
PARTITION (dt='2001-01-01', country='GB');
+LOAD DATA LOCAL INPATH 'input/hive/partitions/file2'
+INTO TABLE logs
+PARTITION (dt='2001-01-01', country='GB');
+
+LOAD DATA LOCAL INPATH 'input/hive/partitions/file3'
+INTO TABLE logs
+PARTITION (dt='2001-01-01', country='US');
+
+LOAD DATA LOCAL INPATH 'input/hive/partitions/file4'
+INTO TABLE logs
+PARTITION (dt='2001-01-02', country='GB');
+
+LOAD DATA LOCAL INPATH 'input/hive/partitions/file5'
+INTO TABLE logs
+PARTITION (dt='2001-01-02', country='US');
+
+LOAD DATA LOCAL INPATH 'input/hive/partitions/file6'
+INTO TABLE logs
+PARTITION (dt='2001-01-02', country='US');
+
+SHOW PARTITIONS logs;
+
SELECT ts, dt, line
FROM logs
WHERE country='GB';

0 comments on commit 98159e9

Please sign in to comment.