zxs / tungsten-replicator

Automatically exported from code.google.com/p/tungsten-replicator
0 stars 0 forks source link

importing data into hadoop fails if the table definition contains reserved words #903

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

Running bin-load-reduce-check creates the table metadata when importing from a 
RDBMS.   
As part of this process, objects named using reserved words contained in 
tungsten-replicator/samples/extensions/velocity/includes/hive-reserved-words.vm 
should be renamed by prepending a '_'. For example, a column named 'COMMENT' 
should become '_COMMENT'.  
However, this operation is somehow skipped, and any table that contains a 
reserved word or is itself named with a reserved word will break the import 
process.

create table reserved_words (id int not null primary key, location varchar(30), 
buckets int, cluster int);

What is the expected output?

The table is imported with some columns renamed.

What do you see instead?

FAILED: ParseException line 10:2 mismatched input 'location' expecting 
Identifier near ',' in column specification

What is the possible cause?

It seems that the reserved words renaming is not happening

What is the proposed solution?

N/A

Original issue reported on code.google.com by g.maxia on 13 May 2014 at 4:40

GoogleCodeExporter commented 9 years ago

Original comment by linas.vi...@continuent.com on 29 May 2014 at 3:24

GoogleCodeExporter commented 9 years ago

Original comment by linas.vi...@continuent.com on 19 Dec 2014 at 7:03

GoogleCodeExporter commented 9 years ago

Original comment by linas.vi...@continuent.com on 19 Jan 2015 at 2:18