Skip to content
An input format that returns a single split with a single row
Java
Latest commit 2a41ca0 Apr 30, 2012 @edwardcapriolo Licence
Failed to load latest commit information.
src Licence Apr 30, 2012
NOTICE.txt Yay! First code drop. Apr 30, 2012
README.md Better readme! Apr 30, 2012
pom.xml Yay! First code drop. May 1, 2012

README.md

DualInputFormat

An input format that returns a single split with a single row.

Can be used from hive like this.

client.execute ( "add jar "+jarFile);
client.execute("create table  dual  (fake string) "+
        "STORED AS INPUTFORMAT 'com.m6d.dualinputformat.DualInputFormat'"+
        "OUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'");
client.execute("load data local inpath '" + p.toString() + "' into table dual");
client.execute("select count(1) as cnt from dual");
String row = client.fetchOne();
assertEquals( "1", row);

client.execute("select * from dual");
row = client.fetchOne();
assertEquals( "", row);

client.execute("drop table dual");
Something went wrong with that request. Please try again.