Four Stars

Getting Talend to carry over the user schema from SQL Server

Hi.  We are running SQL Server 2016 and TOD 6.3.1.  When creating the initial connection to SQL Server, we are not inputting a specific schema to connect to as there are multiple.  After retrieving the table schema via Talend, however, I would expect that the schema would be populated with the table components, but it isn't.  The user schema remains empty, thus causing our Talend job to fail because the SQL query fails to find the correct table.  Is there a configuration that we are missing that will populate the user schema upon table schema retrieval?  Thank you.

 

Cathy

1 REPLY
Twelve Stars TRF
Twelve Stars

Re: Getting Talend to carry over the user schema from SQL Server

Hi,

 

Sorry, your message is not very clear.

I suppose you are speaking about the user schema in the tMSSqlConnection component.

If it is empty, all queries have to define the schema explicitly to address the desired SQL objects using the syntax:

schema.table.column

Schema can be define as a context variable which allow you to construct the desired query by concatenation:

context.SQLServerSchema+"table.column"

Also, as a shortcut, you can retriee a table schema by writing "select * from yourTable" or "select * from yourSchema.yourTable" in the tMSSqlInput component.

Then hit "Guess schema" and after that, hit "Guess Query" to get the detailed select with all the columns according to the table schema.

 

Hope this helps,

 


TRF