Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Sqoop is what you are looking for ! I'm using it to send my data into MySQL. The only trick is that you must use TEXTFILE without partitions from</p> <pre><code>file_format: : SEQUENCEFILE | TEXTFILE | RCFILE (Note: only available starting with 0.6.0) | ORC (Note: only available starting with 0.11.0) | INPUTFORMAT input_format_classname OUTPUTFORMAT output_format_classname </code></pre> <p><a href="https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL#LanguageManualDDL-Create%2FDrop%2FTruncateTable" rel="nofollow">https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL#LanguageManualDDL-Create%2FDrop%2FTruncateTable</a></p> <p>If it's not in TEXTFILE, you can do a </p> <blockquote> <p>INSERT INTO TABLE tablename1 [PARTITION (partcol1=val1, partcol2=val2 ...)] select_statement1 FROM from_statement;</p> </blockquote> <p><a href="https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DML#LanguageManualDML-InsertingdataintoHiveTablesfromqueries" rel="nofollow">https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DML#LanguageManualDML-InsertingdataintoHiveTablesfromqueries</a></p> <p>Now that you have your export table, you may use sqoop as follow: </p> <pre><code>sqoop export --connect ${YOUR_CONNECTION_STRING} --username ${YOUR_USERNAME} --password ${YOUR_PASSWORD} --table ${MYSQL_TABLE_NAME} --update-key ${FIELD1[,FIELD2]*} --update-mode allowinsert --export-dir ${PATH_TO_YOUR_HIVE_TABLE_ON_HDFS} --input-fields-terminated-by \001 --num-mappers 1 --batch --verbose </code></pre> <p><a href="http://sqoop.apache.org/docs/1.4.4/SqoopUserGuide.html#_syntax_3" rel="nofollow">http://sqoop.apache.org/docs/1.4.4/SqoopUserGuide.html#_syntax_3</a></p> <p>Good luck !</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload