Re: Connection via JDBC to Oracle hangs after count call

2016-07-11 Thread Chanh Le
Hi Mich, If I have a stored procedure in Oracle write like this SP get Info: PKG_ETL.GET_OBJECTS_INFO( p_LAST_UPDATED VARCHAR2, p_OBJECT_TYPE VARCHAR2, p_TABLE OUT SYS_REFCURSOR); How to call in Spark because the output is cursor p_TABLE OUT SYS_REFCURSOR. Thanks.

Re: Connection via JDBC to Oracle hangs after count call

2016-07-11 Thread Mark Vervuurt
Thanks Mich, we have got it working using the example here under ;) Mark > On 11 Jul 2016, at 09:45, Mich Talebzadeh wrote: > > Hi Mark, > > Hm. It should work. This is Spark 1.6.1 on Oracle 12c > > > scala> val HiveContext = new

Re: Connection via JDBC to Oracle hangs after count call

2016-07-11 Thread Mich Talebzadeh
Hi Mark, Hm. It should work. This is Spark 1.6.1 on Oracle 12c scala> val HiveContext = new org.apache.spark.sql.hive.HiveContext(sc) HiveContext: org.apache.spark.sql.hive.HiveContext = org.apache.spark.sql.hive.HiveContext@70f446c scala> var _ORACLEserver : String =

Re: Connection via JDBC to Oracle hangs after count call

2016-07-11 Thread Mark Vervuurt
Hi Mich, sorry for bothering did you manage to solve your problem? We have a similar problem with Spark 1.5.2 using a JDBC connection with a DataFrame to an Oracle Database. Thanks, Mark > On 12 Feb 2016, at 11:45, Mich Talebzadeh > wrote: >

Connection via JDBC to Oracle hangs after count call

2016-02-12 Thread Mich Talebzadeh
Hi, I use the following to connect to Oracle DB from Spark shell 1.5.2 spark-shell --master spark://50.140.197.217:7077 --driver-class-path /home/hduser/jars/ojdbc6.jar in Scala I do scala> val sqlContext = new org.apache.spark.sql.SQLContext(sc) sqlContext: