Skip to content

viadea/HiveUDTF

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

HiveUDTF

This Hive UDTF will duplicate the first input column

a. How to build the jar

mvn package

##b. Prepare a Hive table with sample data

In Hive CLI, create a test table:

create table testudtf(a string, b string) ROW FORMAT DELIMITED FIELDS TERMINATED BY ",";

Put below data for above Hive table:

echo "abc,xyz" > test.csv

##c. Test UDTF

ADD JAR ~/target/DoubleColumn-1.0.0.jar;
CREATE TEMPORARY FUNCTION double_column AS 'openkb.hive.udtf.DoubleColumn'; 
SELECT double_column(a,b) as (a1,a2,b) FROM testudtf;

Result:
abc	abc	xyz

About

This Hive UDTF will duplicate the first input column

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages