One Star

Cannot specify database schema

Hello,
I want to use a tMSSqlOutput component but it fails when I run it because it cannot find the table:
java.sql.SQLException: Invalid object name 'users'
If I change the table name to dbo.users I get the same error:
java.sql.SQLException: Invalid object name 'dbo.users'
Why isn't it possible to select the database schema (like oracle connections) for a SQLServer component?
Is there a way around that (and connecting with a different user is not an option for me).

Thanks
2 REPLIES
Community Manager

Re: Cannot specify database schema

Hi
Can you upload some screenshots of your job and schema of tMSsqlOutput component?
Best regards
shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: Cannot specify database schema

The problem is that I need the update statement to be something like:
update dbo.users set ...
The generated code is
update "dbo.users" set...
which would suggest a table named "dbo.users" and not the users table in the dbo schema.
I found a way around it, in the properties I have set the table name as: "dbo\".\"users"
which then produce update "dbo"."users" set ...
As I said, in my company I don't have the liberty to connect to the database with any user, so it is important that we can set the proper schema.
For now I can work this way, but it would be good if the schema concept could be added to all the databases components, as in my opinion all of them let you connect with a user but may need to update some other user/schema tables (if you have the privilege to do so)

Thanks