hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shantian Purkad <>
Subject Passing table properties to the InputFormat
Date Sun, 21 Aug 2011 00:01:41 GMT

I have a custom Input format that reads multiple lines as one row based on number of columns
in a table.

I want to dynamically pass the table properties (like number of columns in table, their data
types etc. just like what you get in SerDe) How can I do that?

If that is not possible, and SerDe is an option, how can I use my custom record reader in

My table definition is 

create table delimited_data_serde
col1 int,
col2 string,
col3 int,
col4 string,
col5 string,
col6 string

STORED AS INPUTFORMAT 'fwrk.hadoop.input.DelimitedInputFormat'

The input format needs needs the property 'total.fields.count'='6'
If I set this using set total.fields.count=6 ; It works, however I will have to change this
property for every table that uses the custom Input format before I query that table.
How can I automatically get handle to the table properties in input format?


View raw message