don't want to use while loop to load in batches.
Hm, with that many rows, you are probably better off inserting the rows in batches. It could be more than a mouthful to try to insert all at once.
The extra column can easily be achieved with
row_number() (ORDER BY (SELECT 1)) % 1000 + 1 AS extra_column
Here I've said that I don't care about the order of the numbering. If you want the numbering be based some order of the data, you are in for quite a challenge.