Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
art400
Contributor
Contributor

tDBInput(Oracle) will not recognize Oracle Schema from DB Connection

Forgive me if there is something obvious that I am not seeing. I created a DB Connection for Oracle, and within it I specified the default Oracle schema. However, when I use SQL builder or data viewer, I get ORA-00942, "table or view does not exist". I can hard-code the schema to the tables and the query works, but it defeats the benefit of storing the default schema in the DB connection profile.

The Oracle DB connection values show in the context variables, with the required schema there. Obviously, I'd like to not have to hard-code my queries. Is there some trick I am missing? Using Talend Studio 8.0.1, Oracle 18.

Thanks,

Art

Labels (3)
6 Replies
Anonymous
Not applicable

@Not defined Not defined​, I'm afraid I don't understand your problem well, can you share a screenshot to explain it?

 

Regards

Shong

art400
Contributor
Contributor
Author

Shong,

I'm providing three screen shots. The first is the component configuration (tDBInput), which shows that I specified PRODLAW as the Oracle schema to use. The second shot shows the SQL Builder panel, where the query works if the two tables are qualified to PRODLAW. The third screen shot shows the ORA-00942 error when I remove the PRODLAW qualifications.

In most other JDBC access scenarios I've used, I've been able to set the default schema, therefore removing the need to hard-code schema names. This means I have one SQL script and I don't have to have two versions for dev and prod.

I am assuming that the reason for the "Oracle schema" entry in the DB set-up is to achieve this, and I see no other way to run an ALTER SESSION SET CURRENT SCHEMA command.

 

Can you either point out a way to make this happen, or let me know if I am stuck hard-coding in my SQL statements?

 

Thanks,

 

Art

art400
Contributor
Contributor
Author

 
art400
Contributor
Contributor
Author

 
art400
Contributor
Contributor
Author

Added screen shots and additional info, please review and reply

Anonymous
Not applicable

if you don't specify schema, it will use the default schema of the user. Which version of studio are you using? I can't reproduce the issue on version 8.0.1

0695b00000dd3MYAAY.png

BTW, you can use a tOracleRow to run an ALTER SESSION SET CURRENT SCHEMA command. Using tOracleConnection to create a DB connection, use the already existing DB connection on tOracleRow and tOracleInput component.

 

Regards

Shong