Exporting query results to Amazon S3

Use Hue to export query results to Amazon S3 as a custom file, a MapReduce file, or as a table.

  1. Run and Export Results in Hive
    1. Run the query by clicking Execute Hue Run icon.
    2. Click Get Results Hue Download icon Blue.
    3. Select Export to open the Save query result dialog.




  2. Save Results as Custom File
    1. Select In store (max 10000000 cells) and open the Path to CSV file dialog.
    2. Navigate into the bucket, s3a://quakes.
    3. Create folder named, "output."
    4. Navigate into the output directory and click Select this folder.
    5. Append a file name to the path, such as quakes.cvs.
    6. Click Save. The results are saved as s3a://quakes/output/quakes.csv.


  3. Save Results as MapReduce files
    1. Select In store (large result) and open the Path to empty directory dialog.
    2. Navigate into the bucket, s3a://quakes.
    3. If you have not done so, create a folder named, "output."
    4. Navigate into the output directory and click Select this folder.
    5. Click Save. A MapReduce job is run and results are stored in s3a://quakes/output/.


  4. Save Results as Table
    1. Run a query for "moment" earthquakes and export:
      
      SELECT time, latitude, longitude, mag
      FROM `default`.`earthquakes`
      WHERE magtype IN ('mw','mwb','mwc','mwr','mww');
    2. Select A new table and input <database>.<new table name>.
    3. Click Save.
    4. Click Browse Data Hue Browse Data icon to view the new table.