1

I imported a table from sql using sqoop import using the command sqoop import. On doing a select count(*) from Hive, I'm getting the row count as

231743

But the actual SQL table has 231742 rows.

Why am I getting one row extra for this table?

I imported 2 other similar tables have large amounts of data and am getting the exact count. But this particular table gives me an extra row in hive. Why is that? :-o

PS: I included --hive-drop-import-delims with the sqoop import command

Thanks in advance :)

UPDATE: Seems like I have duplicate entries in the table. It got generated during the import. Anyone has any idea why? :)

4

1 回答 1

0

好的..我已经解决了。

在 sqoop 导入命令中,我没有使用 --table 表名,而是使用了 --query SELECT * FROM table-name WHERE $CONDITIONS。那解决了它。

感谢您的意见。

于 2012-06-07T05:08:03.537 回答