You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Joby Joje (JIRA)" <ji...@apache.org> on 2018/11/30 14:49:00 UTC
[jira] [Closed] (SPARK-26234) Column list specification in INSERT
statement
[ https://issues.apache.org/jira/browse/SPARK-26234?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Joby Joje closed SPARK-26234.
-----------------------------
A card SPARK-20845 is already in place to resolve this, hence closing the ticket.
> 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
> Priority: Major
>
> 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 into 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