Uploaded image for project: 'Pig'
  1. Pig
  2. PIG-2482

Integrate HCat DDL command into Pig

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.11
    • Component/s: impl
    • Labels:
      None
    • Hadoop Flags:
      Reviewed
    • Release Note:
      Hide
      Pig support sql command in script/grunt/embedding.

      Script/grunt:
      sql create table ......;

      Note the sql statement end with a ";"

      embedding:
      from org.apache.pig.scripting import Pig
      ret = Pig.sql("""drop table if exists table_1;""")
      if ret==0:
          #success

      Configuration:
      pig.sql.type=hcat (backend of sql, hcat is the only sql backend now)
      hcat.bin=/usr/local/hcat/bin/hcat (binary location for hcat)
      Show
      Pig support sql command in script/grunt/embedding. Script/grunt: sql create table ......; Note the sql statement end with a ";" embedding: from org.apache.pig.scripting import Pig ret = Pig.sql("""drop table if exists table_1;""") if ret==0:     #success Configuration: pig.sql.type=hcat (backend of sql, hcat is the only sql backend now) hcat.bin=/usr/local/hcat/bin/hcat (binary location for hcat)

      Description

      We would like to run hcat DDL command inside Pig script or Grunt. We can use a similar approach as "fs" or "sh".

      Grunt> hcat create table .....

      Similar to "fs" and "sh", we don't plan to add Java API in PigServer for it.

        Attachments

        1. PIG-2482-1.patch
          9 kB
          Daniel Dai
        2. PIG-2482-2.patch
          9 kB
          Daniel Dai
        3. PIG-2482-3.patch
          12 kB
          Daniel Dai

          Activity

            People

            • Assignee:
              daijy Daniel Dai
              Reporter:
              daijy Daniel Dai
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: