HDP on Windows – Installation Forum

Hive Groovy Transform

  • #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?

to create new topics or reply. | New User Registration

  • Author
    Replies
  • #32949
    Robert
    Participant

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

    Regards,
    Robert

    #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.

    #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

    #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;

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

Support from the Experts

A HDP Support Subscription connects you experts with deep experience running Apache Hadoop in production, at-scale on the most demanding workloads.

Enterprise Support »

Become HDP Certified

Real world training designed by the core architects of Hadoop. Scenario-based training courses are available in-classroom or online from anywhere in the world

Training »

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.