You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Liang-Chi Hsieh (JIRA)" <ji...@apache.org> on 2015/06/01 17:51:17 UTC

[jira] [Commented] (SPARK-8004) Spark does not enclose column names when fetchting from jdbc sources

    [ https://issues.apache.org/jira/browse/SPARK-8004?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14567467#comment-14567467 ] 

Liang-Chi Hsieh commented on SPARK-8004:
----------------------------------------

I think backticks are only working for MySQL?

> Spark does not enclose column names when fetchting from jdbc sources
> --------------------------------------------------------------------
>
>                 Key: SPARK-8004
>                 URL: https://issues.apache.org/jira/browse/SPARK-8004
>             Project: Spark
>          Issue Type: Bug
>            Reporter: Rene Treffer
>
> Spark failes to load tables that have a keyword as column names
> Sample error:
> {code}
> org.apache.spark.SparkException: Job aborted due to stage failure: Task 0 in stage 157.0 failed 1 times, most recent failure: Lost task 0.0 in stage 157.0 (TID 4322, localhost): com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'key,value FROM [XXXXXX]'
> {code}
> A correct query would have been
> {code}
> SELECT `key`.`value` FROM ....
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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