Support Questions
Find answers, ask questions, and share your expertise

From SQl To Hadoop

From SQl To Hadoop

IF I have Apache Hadoop 2.7.1

With hive version

Hive 2.0.1

and i want to insert data from sql table to hadoop

i understood that i have to have hive database and install sql odbc driver on hadoop then

we can use linked query to select data from hadoop to sql server

can't we make the opposite operation by using linked query too ?

should i have to use another tool to do that like sqoop?

is sql server poly base a way to select data from hadoop to sql server only does it do the opposite operation ?

please can you put any links that is related to this topic


Re: From SQl To Hadoop

Expert Contributor

Re: From SQl To Hadoop

New Contributor

Hello alshiekh

What ever data you have inserted into one text file or log file that can put on one path in hdfs and then write a query as follows in hive

  hive>load data inpath<<specify inputpath>>intotable<<tablename>>;


hive>createtable foo (id int, name string)row format delimited
fields terminated by'\t'or'|'or','
stored as text file;table created..
    hive>load data inpath '/home/hive/foodata.log'intotable foo;

Hope this helps, You can find more inserting into tables from SQL


Madison Quinn