Re: Spark cannot find tables in Oracle database

2018-02-11 Thread Lian Jiang
Thanks Guys for help!

Georg's proposal fixed the issue. Thanks a lot.

On Sun, Feb 11, 2018 at 7:59 AM, Georg Heiler 
wrote:

> I had the same problem. You need to uppercase all tables prior to storing
> them in oracle.
> Gourav Sengupta  schrieb am So. 11. Feb. 2018
> um 10:44:
>
>> Hi,
>>
>> since you are using the same user as the schema, I do not think that
>> there is an access issue. Perhaps you might want to see whether there is
>> anything case sensitive about the the table names. I remember once that the
>> table names had to be in small letters, but that was in MYSQL.
>>
>>
>> Regards,
>> Gourav
>>
>> On Sun, Feb 11, 2018 at 2:26 AM, Lian Jiang 
>> wrote:
>>
>>> Hi,
>>>
>>> I am following https://spark.apache.org/docs/latest/sql-
>>> programming-guide.html#jdbc-to-other-databases to query oracle database
>>> 12.1 from spark shell 2.11.8.
>>>
>>> val jdbcDF = spark.read
>>>   .format("jdbc")
>>>   .option("url", "jdbc:oracle:thin:@(DESCRIPTION = (ADDRESS = (PROTOCOL = 
>>> TCP)(HOST = 129.106.123.73)(PORT = 1521))(CONNECT_DATA =(SERVER = 
>>> DEDICATED)(SERVICE_NAME = pdb1.subnet1.hadoop.oraclevcn.com)))")
>>>   .option("dbtable", "HADOOP_DEV.SYMBOLINFO")
>>>   .option("user", "hadoop_dev")
>>>   .option("password", "mypassword")
>>>   .load()
>>>
>>> This statement failed due to "ORA-00942: table or view does not exist"
>>> even SymbolInfo table does exist in hadoop_dev schema.
>>>
>>> Any clue? Thanks!
>>>
>>
>>


Re: Spark cannot find tables in Oracle database

2018-02-11 Thread Georg Heiler
I had the same problem. You need to uppercase all tables prior to storing
them in oracle.
Gourav Sengupta  schrieb am So. 11. Feb. 2018 um
10:44:

> Hi,
>
> since you are using the same user as the schema, I do not think that there
> is an access issue. Perhaps you might want to see whether there is anything
> case sensitive about the the table names. I remember once that the table
> names had to be in small letters, but that was in MYSQL.
>
>
> Regards,
> Gourav
>
> On Sun, Feb 11, 2018 at 2:26 AM, Lian Jiang  wrote:
>
>> Hi,
>>
>> I am following
>> https://spark.apache.org/docs/latest/sql-programming-guide.html#jdbc-to-other-databases
>> to query oracle database 12.1 from spark shell 2.11.8.
>>
>> val jdbcDF = spark.read
>>   .format("jdbc")
>>   .option("url", "jdbc:oracle:thin:@(DESCRIPTION = (ADDRESS = (PROTOCOL = 
>> TCP)(HOST = 129.106.123.73)(PORT = 1521))(CONNECT_DATA =(SERVER = 
>> DEDICATED)(SERVICE_NAME = pdb1.subnet1.hadoop.oraclevcn.com)))")
>>   .option("dbtable", "HADOOP_DEV.SYMBOLINFO")
>>   .option("user", "hadoop_dev")
>>   .option("password", "mypassword")
>>   .load()
>>
>> This statement failed due to "ORA-00942: table or view does not exist"
>> even SymbolInfo table does exist in hadoop_dev schema.
>>
>> Any clue? Thanks!
>>
>
>


Re: Spark cannot find tables in Oracle database

2018-02-11 Thread Gourav Sengupta
Hi,

since you are using the same user as the schema, I do not think that there
is an access issue. Perhaps you might want to see whether there is anything
case sensitive about the the table names. I remember once that the table
names had to be in small letters, but that was in MYSQL.


Regards,
Gourav

On Sun, Feb 11, 2018 at 2:26 AM, Lian Jiang  wrote:

> Hi,
>
> I am following https://spark.apache.org/docs/latest/sql-
> programming-guide.html#jdbc-to-other-databases to query oracle database
> 12.1 from spark shell 2.11.8.
>
> val jdbcDF = spark.read
>   .format("jdbc")
>   .option("url", "jdbc:oracle:thin:@(DESCRIPTION = (ADDRESS = (PROTOCOL = 
> TCP)(HOST = 129.106.123.73)(PORT = 1521))(CONNECT_DATA =(SERVER = 
> DEDICATED)(SERVICE_NAME = pdb1.subnet1.hadoop.oraclevcn.com)))")
>   .option("dbtable", "HADOOP_DEV.SYMBOLINFO")
>   .option("user", "hadoop_dev")
>   .option("password", "mypassword")
>   .load()
>
> This statement failed due to "ORA-00942: table or view does not exist"
> even SymbolInfo table does exist in hadoop_dev schema.
>
> Any clue? Thanks!
>


Re: Spark cannot find tables in Oracle database

2018-02-11 Thread Jörn Franke
Maybe you do not have access to the table/view. Incase of a view it could be 
also that you do not have access to the underlying table.
Have you tried with another sql tool to access it?

> On 11. Feb 2018, at 03:26, Lian Jiang  wrote:
> 
> Hi,
> 
> I am following 
> https://spark.apache.org/docs/latest/sql-programming-guide.html#jdbc-to-other-databases
>  to query oracle database 12.1 from spark shell 2.11.8.
> 
> val jdbcDF = spark.read
>   .format("jdbc")
>   .option("url", "jdbc:oracle:thin:@(DESCRIPTION = (ADDRESS = (PROTOCOL = 
> TCP)(HOST = 129.106.123.73)(PORT = 1521))(CONNECT_DATA =(SERVER = 
> DEDICATED)(SERVICE_NAME = pdb1.subnet1.hadoop.oraclevcn.com)))")
>   .option("dbtable", "HADOOP_DEV.SYMBOLINFO")
>   .option("user", "hadoop_dev")
>   .option("password", "mypassword")
>   .load()
> This statement failed due to "ORA-00942: table or view does not exist" even 
> SymbolInfo table does exist in hadoop_dev schema.
> 
> Any clue? Thanks!


Spark cannot find tables in Oracle database

2018-02-10 Thread Lian Jiang
Hi,

I am following
https://spark.apache.org/docs/latest/sql-programming-guide.html#jdbc-to-other-databases
to query oracle database 12.1 from spark shell 2.11.8.

val jdbcDF = spark.read
  .format("jdbc")
  .option("url", "jdbc:oracle:thin:@(DESCRIPTION = (ADDRESS =
(PROTOCOL = TCP)(HOST = 129.106.123.73)(PORT = 1521))(CONNECT_DATA
=(SERVER = DEDICATED)(SERVICE_NAME =
pdb1.subnet1.hadoop.oraclevcn.com)))")
  .option("dbtable", "HADOOP_DEV.SYMBOLINFO")
  .option("user", "hadoop_dev")
  .option("password", "mypassword")
  .load()

This statement failed due to "ORA-00942: table or view does not exist" even
SymbolInfo table does exist in hadoop_dev schema.

Any clue? Thanks!