Run a Hive Program


Run a Hive Program Icon in the SAS Data Loader Window
Use the Run a Hive Program directive to create jobs that execute Hive programs in Hadoop. The directive enables you to browse available Hive functions and click to add function syntax into a text editor. You can also copy and paste existing Hive programs directly into the text editor. The user credentials that are specified in the Hadoop Configuration panel of the SAS Data Loader Configuration window are used to submit Hive code to the Hadoop cluster.
Note: User-written Hive code can also be submitted using the directives Delete Rows, Query or Join Data in Hadoop, or Sort and De-Duplicate Data in Hadoop. These directives provide a Hive expression builder that is used to filter or delete rows.


Follow these steps to use the Run a Hive Program directive:
  1. In the SAS Data Loader directives page, click Run a Hive Program.
  2. In the Code task, click Hive expression and enter Hive code, or right-click to cut and paste existing Hive code from your file system.
    • The pop-up menu also enables you to display line numbers and to navigate to the beginning or the end of the program.
    • The Hive program needs to explicitly define data sources and targets.
  3. To add Hive functions to your program, click in Resources to expand categories and to display examples of function syntax. To move function syntax into your program, click the function and click Icon that adds function to program.
    Run a Hive Program Resources Box and Function Selection
  4. When your program is ready to run, click Next.
  5. In the Result task, click Start HIVE program. As your program runs, you receive start and end date and time information, along with Log, Code, and possibly Error Details icons. Click the icons as needed to resolve errors.
    The final status of the job is displayed in the Result taskbar.
  6. Click Save to save your program for reuse. To edit or run your job in the future, go to the SAS Data Loader directives page and click Saved Directives.