Does Sqoop Preserves Order Of Imported Rows As In Database
I am sqooping a table from oracle database to AWS S3 & then creating a hive table over it. After importing the data, is the order of records present in database preserved in hi
Solution 1:
Order is not preserved during import, also order is not determined when selecting without ORDER BY or DISTRIBUTE+SORT due to parallel select processing.
You need to specify order by when selecting data, does not matter how it was inserted.
ORDER BY orders all data, will work on single reducer, DISTRIBUTE BY + SORT orders per reducer and works in distributed mode.
Also see this answer https://stackoverflow.com/a/40264715/2700344
Post a Comment for "Does Sqoop Preserves Order Of Imported Rows As In Database"