Hive Groovy Transform

This topic contains 4 replies, has 2 voices, and was last updated by  SUNDARARAJ BALAKUMAR 1 year, 6 months ago.

  • Creator
    Topic
  • #32668

    I’m trying to add a xml mapper in Groovy to Transform XML in hive Select. I’m getting an error
    Caused by: java.io.IOException: Cannot run program “C:\BigData\sampleMapper.groovy”: CreateProcess error=193, %1 is not a valid Win32 application
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:460)
    at org.apache.hadoop.hive.ql.exec.ScriptOperator.processOp(ScriptOperator.java:287)
    … 18 more
    Caused by: java.io.IOException: CreateProcess error=193, %1 is not a valid Win32 application
    at java.lang.ProcessImpl.create(Native Method)
    at java.lang.ProcessImpl.(ProcessImpl.java:81)
    at java.lang.ProcessImpl.start(ProcessImpl.java:30)
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:453)
    … 19 more

    Can you please let me know how to use Groovy script in Hive?

Viewing 4 replies - 1 through 4 (of 4 total)

You must be to reply to this topic. | Create Account

  • Author
    Replies
  • #33158

    I have stored XML as string in a hive table. I’m trying to return XML as rows using transform.

    SELECT
    TRANSFORM (str)
    USING ‘SampleMapper.groovy’
    AS (field1,field2)
    FROM tbhivexml;

    Collapse
    #33035

    Robert
    Participant

    Hi Sundar,
    What are you actually trying to do? Are you trying to capture the stream input and do some data massaging then send it over to hive to process?

    Kind Regards,
    Robert

    Collapse
    #32973

    Robert ,
    I tired with Python script and getting same error Caused by: java.io.IOException: CreateProcess error=193, %1 is not a valid Win32 application.

    Thanks
    Sundar.

    Collapse
    #32949

    Robert
    Participant

    Hi Sundar,
    It looks like an issue possibly with groovy. Have you tried posting your error there?

    Regards,
    Robert

    Collapse
Viewing 4 replies - 1 through 4 (of 4 total)
Hortonworks Data Platform
The Hortonworks Data Platform is a 100% open source distribution of Apache Hadoop that is truly enterprise grade having been built, tested and hardened with enterprise rigor.
Get started with Sandbox
Hortonworks Sandbox is a self-contained virtual machine with Apache Hadoop pre-configured alongside a set of hands-on, step-by-step Hadoop tutorials.
Modern Data Architecture
Tackle the challenges of big data. Hadoop integrates with existing EDW, RDBMS and MPP systems to deliver lower cost, higher capacity infrastructure.