为什么要在 sqoop 中使用以下命令?
why to use following command in sqoop?
我对下面的sqoop导入命令有疑问
sqoop import \
--connect jdbc:mysql://localhost/userdb \
--username user_name \
--table user_table \
--m 1 \
--target-dir /sample
为什么我们在上面的命令中使用M?请澄清
-m 表示映射器,通过指定-m 1 意味着您只需要一个映射器即可运行 导入table。这用于控制并行度。为了实现并行性,sqoop 使用主 key/unique 键从源 table.
中拆分行
基本上 sqoop 中映射器的默认数量是 4。因此为此您需要提及您需要使用 --split-by column_name
实现并行性的列,因此通过给定 -m 1 您不需要拆分。
有关详细信息,请查看以下内容 link、
我对下面的sqoop导入命令有疑问
sqoop import \
--connect jdbc:mysql://localhost/userdb \
--username user_name \
--table user_table \
--m 1 \
--target-dir /sample
为什么我们在上面的命令中使用M?请澄清
-m 表示映射器,通过指定-m 1 意味着您只需要一个映射器即可运行 导入table。这用于控制并行度。为了实现并行性,sqoop 使用主 key/unique 键从源 table.
中拆分行基本上 sqoop 中映射器的默认数量是 4。因此为此您需要提及您需要使用 --split-by column_name
实现并行性的列,因此通过给定 -m 1 您不需要拆分。
有关详细信息,请查看以下内容 link、