0

I am attempting to insert into a table by selecting from another:

INSERT OVERWRITE TABLE testtable1 select * from testtable0

The error:

Moving data to: wasb://{container}@{storage}.blob.core.windows.net/hive/scratch/hive_2015-06-01_15-05-14_062_6478651325775395196-1/-ext-10000
Loading data to table default.testtable1
rmr: DEPRECATED: Please use 'rm -r' instead.
rmr: Cannot move "wasb://{container}@{storage}.blob.core.windows.net/" to the trash, as it contains the trash. Consider using -skipTrash option
Failed with exception null

Is the -r suggestion and the -skipTrash option to be added to the hive query? What should the syntax be, or is there a better way to do this query?

Roger
  • 2,063
  • 4
  • 32
  • 65

1 Answers1

0

Can you share the location you are pointing to when you create testtable1?

It seems like your testtable is pointing to the root container in your WASB storage account. Hive works on a folder level and not a file level. Since you do not provide a sub-directory for the table data to be stored in, it tries to delete the entire data in your container which contains the trash folder.

Simply add a sub-folder when you are creating your testtable and that should fix the problem.

Rashim Gupta
  • 108
  • 5
  • I believe I had the locations correctly used, but not the folders. Also might have been another symptom of this: http://stackoverflow.com/questions/30580097/not-a-file-exception-on-select-after-successful-insert Either way, I used a different approach: http://stackoverflow.com/questions/30537584/create-external-table-with-select-from-other-table – Roger Jun 03 '15 at 18:52