Hi,
I am having a UDF function that returns Tuple and that Tuple is going into
HBaseStorage.
these are the commands:
pigServer.registerJar("/home/chethan/UPPER.jar");
pigServer.registerQuery("raw_data = LOAD
'/home/chethan/sample_data.csv' USING PigStorage( ',' ) AS (listing_id:
chararray,fname: chararray,lname: bytearray );");
pigServer.registerQuery("B = FOREACH raw_data GENERATE
myudfs.UPPER('testlog');");
pigServer.registerQuery("STORE B INTO 'hbase://materialformation' USING
HBase.HBaseStorage('cf:depth cf:sand cf:limestone cf:dolomite
cf:shales');");
it is giving exception, No columns to insert.
i am generating schema for B: {(depth: float,sandstone: float,limestone:
float,dolomite: float,shales: float)}
generating schema like this:
public Schema outputSchema(Schema input) {
try{
Schema tupleSchema = new Schema();
tupleSchema.add(new Schema.FieldSchema("depth",
DataType.FLOAT));
tupleSchema.add(new Schema.FieldSchema("sandstone",
DataType.FLOAT));
tupleSchema.add(new Schema.FieldSchema("limestone",
DataType.FLOAT));
tupleSchema.add(new Schema.FieldSchema("dolomite",
DataType.FLOAT));
tupleSchema.add(new Schema.FieldSchema("shales",
DataType.FLOAT));
System.out.println("inside schema");
return tupleSchema;
//return new Schema(new
Schema.FieldSchema(getSchemaName(this.getClass().getName().toLowerCase(),
input),
//tupleSchema, DataType.TUPLE));
}catch (Exception e){
return null;
}
}
but still getting this error,