首页 > 解决方案 > ERROR DefaultJDBCWrapper$: executeUpdate failed for query:

问题描述

its working fine while running in Jupiter notebook without any error ! it throws an error while running with spark submit below is the query and error

from pyspark_llap.sql.session import HiveWarehouseSession
from pyspark.sql import SparkSession
from datetime import datetime
import argparse
import os

ERROR DefaultJDBCWrapper$: executeUpdate failed for query: INSERT OVERWRITE TABLE manas_db.user SELECT distinct prlx as me
    ,qrlx as vn
    ,'' as tire
    ,'' as bike
    ,'' as usergrant
    ,'' as popping
    from grand_db.klas_ll
    where kyrs2 in (444)
    and hbaba_a not in ('rug,brake,rolls')

java.sql.SQLException: Parameter #1 is unset
        at shadehive.org.apache.hive.jdbc.HivePreparedStatement.updateSql(HivePreparedStatement.java:140)
        at shadehive.org.apache.hive.jdbc.HivePreparedStatement.execute(HivePreparedStatement.java:101)
        at org.apache.commons.dbcp2.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:94)
        at org.apache.commons.dbcp2.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:94)
        at com.hortonworks.spark.sql.hive.llap.JDBCWrapper.executeUpdate(HS2JDBCWrapper.scala:360)
        at com.hortonworks.spark.sql.hive.llap.DefaultJDBCWrapper.executeUpdate(HS2JDBCWrapper.scala)
        at com.hortonworks.spark.sql.hive.llap.HiveWarehouseSessionImpl.executeUpdate(HiveWarehouseSessionImpl.java:219)
        at com.hortonworks.spark.sql.hive.llap.HiveWarehouseSessionImpl.executeUpdate(HiveWarehouseSessionImpl.java:212)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at py4j.reflection.MethodInvoker.invoke(MethodInvoker.java:244)
        at py4j.reflection.ReflectionEngine.invoke(ReflectionEngine.java:357)
        at py4j.Gateway.invoke(Gateway.java:282)
        at py4j.commands.AbstractCommand.invokeMethod(AbstractCommand.java:132)
        at py4j.commands.CallCommand.execute(CallCommand.java:79)
        at py4j.GatewayConnection.run(GatewayConnection.java:238)
        at java.lang.Thread.run(Thread.java:748)

标签: sqlpysparkhive

解决方案


推荐阅读