spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ABHISHEK KUMAR GUPTA (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SPARK-26969) [Spark] Using ODBC not able to see the data in table when datatype is decimal
Date Fri, 01 Mar 2019 14:40:00 GMT

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

ABHISHEK KUMAR GUPTA commented on SPARK-26969:
----------------------------------------------

ODBC INSTALLATION 
Follow Below Steps :
1. Install hiveodbc client in cluster 
2. create directory  /opt/odbc and download 
hiveODBC client into /opt/odbc
3. run the following command
rpm -ivh <hiveodbc_client> --nodeps --force 
4. Install unixODBC server in cluster
5. Download unixODBC-origin-2.3.6.tar.gz into /opt/odbc 

6. Compile unixODBC
 ./configure --enable-gui=no --enable-readline=no -prefix=/opt/odbc /unixODBC-2.3.6/unixodbc
 make && make install

7. Configure respective odbc.ini file
[spark2xsingle]
DRIVER=/usr/lib64/libodbchive.so
MODE=0
HOST=xxxx( Thriftserver IP)
PORT=xxxxxxxx( Thriftserver Port)
DATABASE=default
[PRINCIPAL=spark/hadoop@HADOOP.COM|mailto:PRINCIPAL=spark/hadoop@HADOOP.COM]
FRAMED=0
NAMESPACE=sparkthriftserver2x

8.Add the odbc jars to the classPath

9.Run the following command to launch hive client
 isql –v spark2xsingle

 

 

> [Spark] Using ODBC not able to see the data in table when datatype is decimal
> -----------------------------------------------------------------------------
>
>                 Key: SPARK-26969
>                 URL: https://issues.apache.org/jira/browse/SPARK-26969
>             Project: Spark
>          Issue Type: Bug
>          Components: Spark Shell
>    Affects Versions: 2.4.0
>            Reporter: ABHISHEK KUMAR GUPTA
>            Priority: Major
>
> {code}
> #  Using odbc rpm file install odbc 
>  # connect to odbc using isql -v spark2xsingle
>  # SQL> create table t1_t(id decimal(15,2));
>  # SQL> insert into t1_t values(15);
>  # 
> SQL> select * from t1_t;
> +-------------------------+
> | id |
> +-------------------------+
> +-------------------------+  Actual output is empty
> {code}
> Note: When creating table of int data type select is giving result as below
> {code}
> SQL> create table test_t1(id int);
> SQL> insert into test_t1 values(10);
> SQL> select * from test_t1;
> +------------+
> | id         |
> +------------+
> | 10         |
> +------------+
> {code}
> Needs to handle for decimal case.



--
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