我想通过以下命令在Hive中执行多次插入覆盖。HIVE中的多个插入覆盖区
INSERT OVERWRITE table results_3 SELECT NULL, res, NULL, NULL FROM results where field= 'title';
而且results_3表的第一个命令
NULL Up On Cripple Creek (2000 Digital Remaster) NULL NULL
NULL The Weight (2000 Digital Remaster) NULL NULL
NULL Rhythm Of The Rain (LP Version) NULL NULL
NULL Who'll Stop the Rain NULL NULL
NULL I Walk the Line NULL NULL
NULL Against The Wind NULL NULL
NULL Lyin' Eyes NULL NULL
NULL North To Alaska NULL NULL
NULL You Gave Me A Mountain NULL NULL
NULL Night Moves NULL NULL
INSERT OVERWRITE table results_3 SELECT NULL, NULL, res, NULL FROM results where field= 'albums';
而且results_3表的第二个命令
NULL NULL The Band NULL
NULL NULL The Band NULL
NULL NULL The Cascades NULL
NULL NULL Creedence Clearwater Revival NULL
NULL NULL Johnny Cash NULL
NULL NULL Bob Seger NULL
NULL NULL The Eagles NULL
NULL NULL Johnny Horton NULL
NULL NULL Marty Robbins NULL
NULL NULL Bob Seger NULL
后的内容后的内容,但我想两件事情一起合并。你有什么想法我可以解决这个问题吗?
感谢
你如何匹配应合并行?你的表的模式是什么?如果结果表中有一个id,那么你可以执行JOIN。 – libjack 2013-03-25 14:42:28