How to drop a record when using UDT ?

4 views
Skip to first unread message

荆超

unread,
Jul 29, 2010, 11:40:27 PM7/29/10
to cloudba...@googlegroups.com
I try to create tables importing data from text files by using UDT. After the UDT read a line from text file, it have to create a record in CloudBase. I don't want all the lines read into CloudBase and can't find a method. For example, if there is a line with NULL columns, I want to drop this line instead of insert a NULL record into CloudBase.

Tarandeep Singh

unread,
Jul 29, 2010, 11:47:12 PM7/29/10
to cloudba...@googlegroups.com
When you are using UDT, your text files are stored as such on HDFS. Only when you fire sql queries, the UDT class defined by you is called and parsing happens on the fly. At no point your text files were converted to any other internal format. So you can not achieve what you are asking, unless you put a WHERE clauses on the fields (field1 is not null and field2 is not null etc)

On Thu, Jul 29, 2010 at 8:40 PM, 荆超 <jingch...@gmail.com> wrote:
I try to create tables importing data from text files by using UDT. After the UDT read a line from text file, it have to create a record in CloudBase. I don't want all the lines read into CloudBase and can't find a method. For example, if there is a line with NULL columns, I want to drop this line instead of insert a NULL record into CloudBase.

--
You received this message because you are subscribed to the Google Groups "CloudBase" group.
To post to this group, send email to cloudba...@googlegroups.com.
To unsubscribe from this group, send email to cloudbase-use...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/cloudbase-users?hl=en.

Reply all
Reply to author
Forward
0 new messages