Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Plain View
Hive >> mail # user >> How to load phpmyadmin dump .sql file into hive ?


+
sagar nikam 2012-10-28, 04:32
Copy link to this message
-
Re: How to load phpmyadmin dump .sql file into hive ?
Hi Sagar,

Is your data in a flat file or is it in a relational database? If your data
is in a relational database, you can use sqoop to import the data into a
Hive warehouse. You can find step by step tutorial on sqoop here:

http://archive.cloudera.com/cdh/3/sqoop/SqoopUserGuide.html#_connecting_to_a_database_server

Hive doesn't support an INSERT VALUES statement, so you will not be able to
execute this sql directly to insert data into a Hive warehouse.

Thanks,
Shreepadma

On Sat, Oct 27, 2012 at 9:32 PM, sagar nikam <[EMAIL PROTECTED]>wrote:

> i have below .sql file
>
>
> file---->
> ==============================================================> -- Database: `manager`
> -- Table structure for table `access`
> --
>
> CREATE TABLE IF NOT EXISTS `access` (
> `id_access` int(11) NOT NULL AUTO_INCREMENT,
> `no_of_waiter` int(11) NOT NULL,
> `name` varchar(45) NOT NULL,
> `macaddress` mediumtext NOT NULL,
> PRIMARY KEY (`id_access`),
> KEY `no_of_waiter` (`no_of_waiter`)
> ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=99 ;
>
> --
> -- Dumping data for table `access`
> INSERT INTO `access` (`id_access`, `no_of_waiter`, `name`, `macaddress`)
> VALUES
> (66, 19, 'antonio', 'Mozilla/5.0 (compatible)'),
> (2, 6, 'jota', 'Mozilla/5.0 (Windows NT 6.1) ');
> ==============================================================> there are thousands of row,but due to space problem,i m showing only two
> rows data
>
> i googled out & get "sqoop"
> it dont have good tutorials to explain step by step
>
> another way is that i have web address of this phpmyadmin with username &
> passsword also
>
> tell me both ways (which is best & easiest way to import?)
>
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB