You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@spark.apache.org by SNEHASISH DUTTA <in...@gmail.com> on 2018/03/20 13:17:17 UTC

Access Table with Spark Dataframe

Hi,

I am using Spark 2.2 , a table fetched from database contains a (.) dot in
one of the column names.
Whenever I am trying to select that particular column I am getting query
analysis exception.


I have tried creating a temporary table , using createOrReplaceTempView()
and fetch the column's data but same was the outcome.

How can this ('.') be escaped,while querying ?


Thanks and Regards,
Snehasish

Re: Access Table with Spark Dataframe

Posted by hemant singh <he...@gmail.com>.
See if this helps -
https://stackoverflow.com/questions/42852659/makiing-sql-request-on-columns-containing-dot
enclosing column names in "`"

On Tue, Mar 20, 2018 at 6:47 PM, SNEHASISH DUTTA <in...@gmail.com>
wrote:

> Hi,
>
> I am using Spark 2.2 , a table fetched from database contains a (.) dot in
> one of the column names.
> Whenever I am trying to select that particular column I am getting query
> analysis exception.
>
>
> I have tried creating a temporary table , using createOrReplaceTempView()
> and fetch the column's data but same was the outcome.
>
> How can this ('.') be escaped,while querying ?
>
>
> Thanks and Regards,
> Snehasish
>