Hitachi Vantara Pentaho Community Wiki
Child pages
  • Loading Data into Hive

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

...

  1. Start PDI on your desktop. Once it is running choose 'File' -> 'New' -> 'Job' from the menu system or click on the 'New file' icon on the toolbar and choose the 'Job' option.
  2. Add a Start Job Entry: You need to tell PDI where to start the job, so expand the 'General' section of the Design palette and drag a 'Start' job entry onto the job canvas. Your canvas should look like:

  3. Add a Copy File Job Entry: You will need to copy the parsed file into the Hive table, so expand the 'Big Data' section of the Design palette and drag a 'Hadoop Copy Files' job entry onto the job canvas. Your canvas should look like:

  4. Connect the Start and Copy Files job entries: Hover the mouse over the 'Start' job entry and a tooltip will appear. Click on the output connector (the green arrow pointing to the right) and drag a connector arrow to the 'Hadoop Copy Files' node. Your canvas should look like:

  5. Edit the Copy Files Job Entry: Double-click on the 'Hadoop Copy Files' job entry to edit its properties. Enter this information:
    1. File/Folder source: hdfs://<NAMENODE>:<PORT>/user/pdi/weblogs/parse
    2. File/Folder destination: hdfs://<NAMENODE>:<PORT>/user/hive/warehouse/weblogs
    3. Wildcard (RegExp): Enter 'part-.*'
    4. Click the 'Add' button to add the files to the list of files to copy.
      When you are done your window should look like (your folder path may be different):

      Click 'OK' to close the window.
      Notice that you could also load a local file into hive using this step. The file does not already have to be in MapRHadoop.
  6. Save the Job: Choose 'File' -> 'Save as...' from the menu system. Save the transformation as 'load_hive.kjb' into a folder of your choice.
  7. Run the Job: Choose 'Action' -> 'Run' from the menu system or click on the green run button on the job toolbar. A 'Execute a job' window will open. Click on the 'Launch' button. An 'Execution Results' panel will open at the bottom of the PDI window and it will show you the progress of the job as it runs. After a few seconds the job should finish successfully:

...