spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joby Joje (JIRA)" <j...@apache.org>
Subject [jira] [Created] (SPARK-26234) Column list specification in INSERT statement
Date Fri, 30 Nov 2018 13:14:00 GMT
Joby Joje created SPARK-26234:
---------------------------------

             Summary: Column list specification in INSERT statement
                 Key: SPARK-26234
                 URL: https://issues.apache.org/jira/browse/SPARK-26234
             Project: Spark
          Issue Type: Bug
          Components: PySpark
    Affects Versions: 2.3.0
            Reporter: Joby Joje


While trying to OVERWRITE the Hive table with specific columns from Spark(Pyspark) using a
dataframe getting the below error
{quote}pyspark.sql.utils.ParseException: u"\nmismatched input 'col1' expecting
Unknown macro: \{'(', 'SELECT', 'FROM', 'VALUES', 'TABLE', 'INSERT', 'MAP', 'REDUCE'}
(line 1, pos 36)\n\n== SQL ==\ninsert OVERWRITE table DB.TableName (Col1, Col2, Col3) select
Col1, Col2, Col3 FROM dataframe\n------------------------------------^^^\n"
{quote}
{{sparkSession.sql("insert into table DB.TableName (Col1, Col2, Col3) select Col1, Col2, Col3
FROM dataframe")}}

{{But on trying the same via _Hive Terminal_ goes through fine.}}

Please check the below link to get more info on the same.

https://stackoverflow.com/questions/53517671/column-list-specification-in-insert-overwrite-statement

 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org


Mime
View raw message