<tfoot id='IllYH'></tfoot>

    <bdo id='IllYH'></bdo><ul id='IllYH'></ul>

      <small id='IllYH'></small><noframes id='IllYH'>

      <legend id='IllYH'><style id='IllYH'><dir id='IllYH'><q id='IllYH'></q></dir></style></legend>
      <i id='IllYH'><tr id='IllYH'><dt id='IllYH'><q id='IllYH'><span id='IllYH'><b id='IllYH'><form id='IllYH'><ins id='IllYH'></ins><ul id='IllYH'></ul><sub id='IllYH'></sub></form><legend id='IllYH'></legend><bdo id='IllYH'><pre id='IllYH'><center id='IllYH'></center></pre></bdo></b><th id='IllYH'></th></span></q></dt></tr></i><div id='IllYH'><tfoot id='IllYH'></tfoot><dl id='IllYH'><fieldset id='IllYH'></fieldset></dl></div>

      1. 如何将mysql表转移到hive?

        时间:2024-04-15

            <tbody id='DyjAe'></tbody>

            <legend id='DyjAe'><style id='DyjAe'><dir id='DyjAe'><q id='DyjAe'></q></dir></style></legend>
            <tfoot id='DyjAe'></tfoot>
              <bdo id='DyjAe'></bdo><ul id='DyjAe'></ul>
            • <i id='DyjAe'><tr id='DyjAe'><dt id='DyjAe'><q id='DyjAe'><span id='DyjAe'><b id='DyjAe'><form id='DyjAe'><ins id='DyjAe'></ins><ul id='DyjAe'></ul><sub id='DyjAe'></sub></form><legend id='DyjAe'></legend><bdo id='DyjAe'><pre id='DyjAe'><center id='DyjAe'></center></pre></bdo></b><th id='DyjAe'></th></span></q></dt></tr></i><div id='DyjAe'><tfoot id='DyjAe'></tfoot><dl id='DyjAe'><fieldset id='DyjAe'></fieldset></dl></div>
              • <small id='DyjAe'></small><noframes id='DyjAe'>

                  本文介绍了如何将mysql表转移到hive?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我有一个很大的 mysql 表,我想将它转移到一个 Hadoop/Hive 表.是否有标准命令或技术可以将简单(但很大)的表从 Mysql 传输到 Hive?该表主要存储分析数据.

                  I have a large mysql table that I would like to transfer to a Hadoop/Hive table. Are there standard commands or techniques to transfer a simple (but large) table from Mysql to Hive? The table stores mostly analytics data.

                  推荐答案

                  1. 首先下载mysql-connector-java-5.0.8,把jar包放到Sqoop的lib和bin文件夹

                  1. First of all download mysql-connector-java-5.0.8 and put the jar to lib and bin folder of Sqoop

                  在 Hive 中创建表定义,使用 确切的字段名称和类型,就像在 mysql 中一样

                  Create the table definition in Hive with exact field names and types as in mysql

                  sqoop import --verbose --fields-terminated-by ',' --connect jdbc:mysql://localhost/test --table employee --hive-import --warehouse-dir/user/hive/warehouse--fields-terminated-by ',' --split-by id --hive-table 员工

                  sqoop import --verbose --fields-terminated-by ',' --connect jdbc:mysql://localhost/test --table employee --hive-import --warehouse-dir /user/hive/warehouse --fields-terminated-by ',' --split-by id --hive-table employee

                  测试 - 数据库名称

                  employee - 表名(存在于测试中)

                  employee - Table name (present in test)

                  /user/hive/warehouse - HDFS 中需要导入数据的目录

                  /user/hive/warehouse - Directory in HDFS where the data has to be imported

                  --split-by id - id可以是'employee'表的主键

                  --split-by id - id can be the primary key of the table 'employee'

                  --hive-table employee - 其定义存在于 Hive 中的雇员表

                  --hive-table employee - employee table whose definition is present in Hive

                  Sqoop 用户指南(学习 Sqoop 的最佳指南之一)

                  Sqoop User Guide (One of the best guide for learning Sqoop)

                  这篇关于如何将mysql表转移到hive?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:将多行合并为一个空格分隔的字符串 下一篇:SQL 挑战/谜题:如何合并嵌套范围?

                  相关文章

                  <tfoot id='wn6L1'></tfoot>
                    <bdo id='wn6L1'></bdo><ul id='wn6L1'></ul>

                1. <i id='wn6L1'><tr id='wn6L1'><dt id='wn6L1'><q id='wn6L1'><span id='wn6L1'><b id='wn6L1'><form id='wn6L1'><ins id='wn6L1'></ins><ul id='wn6L1'></ul><sub id='wn6L1'></sub></form><legend id='wn6L1'></legend><bdo id='wn6L1'><pre id='wn6L1'><center id='wn6L1'></center></pre></bdo></b><th id='wn6L1'></th></span></q></dt></tr></i><div id='wn6L1'><tfoot id='wn6L1'></tfoot><dl id='wn6L1'><fieldset id='wn6L1'></fieldset></dl></div>

                  <legend id='wn6L1'><style id='wn6L1'><dir id='wn6L1'><q id='wn6L1'></q></dir></style></legend>
                    1. <small id='wn6L1'></small><noframes id='wn6L1'>