PDA

View Full Version : how to load .sql file directly into hive ?



sagrnikam123
10-19-2012, 09:59 AM
i have phpmyadmin dump filename.sql file like
===========================================================================================================

--
-- Database: `motormanager`
-- Table structure for table `acesso`
--

CREATE TABLE IF NOT EXISTS `acesso` (
`id_acesso` int(11) NOT NULL AUTO_INCREMENT,
`fk_usuario` int(11) NOT NULL,
`nome` varchar(45) NOT NULL,
`macaddress` mediumtext NOT NULL,
PRIMARY KEY (`id_acesso`),
KEY `fk_usuario` (`fk_usuario`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=99 ;

--
-- Dumping data for table `acesso`
INSERT INTO `acesso` (`id_acesso`, `fk_usuario`, `nome`, `macaddress`) VALUES
(66, 19, 'antonio', 'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)'),
(2, 6, 'jota', 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.874.106 Safari/535.2');

===================================================================================================

i am showing only two rows here..there are 9 million row in actual file
how can i load this directly into Hive ?