Skip to main content
Announcements
A fresh, new look for the Data Integration & Quality forums and navigation! Read more about what's changed.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Logs and Stats always creates tables in dbo schema

I'm using TOS 4.2.3 with SQL Server 2008.
In SQL Server, i have created a schema called 'log' owner by a user called 'log'.
In TOS, i have created a Metadata DB Connection to the SQl Server DB, specifying a username of 'log', a schema of 'log' and the relevant server, port and password. Click on 'Check Connection'. Everything's ok.
I created a test job with a single MSSglRow component that creates a table (the schema name is *not* explicitly stated in the create table DDL). I execute the job and a table is created in the 'log' schema in my SQL Server DB. So far so good.
I now use the same metadata connection in the job level Logs & Stats tab in order to get talend to create its standard log table in the 'log' schema. However, when i turn on logging and execute the job, the standard talend log table is createdin the 'dbo' schema, not the 'log' schema.
is this a bug, or is there something else i need to do to get this working?
Labels (2)
6 Replies
Anonymous
Not applicable
Author

Hi
I now use the same metadata connection in the job level Logs & Stats tab in order to get talend to create its standard log table in the 'log' schema.

Where do you create the table? Is it created at runtime? Can you please upload a screenshot of parameter setting?
Best regards
Shong
Anonymous
Not applicable
Author

Hi Shong,
Yes - I am leaving the creation of the log table to Talend at runtime (my understanding is that if the tabl does not exist then Talend will create it, othewise it will reuse it).
Screenshot of Job Logs and Stats settings attached.
Based on these settings, I would expect Talend to create the table 'log.LogMessage' not 'dbo.LogMessage'.
Anonymous
Not applicable
Author

Hi
There is no 'create table if not exist' option in the job setting panel, these tables must be created before the job executes. If you want the tables to be created at runtime if it does not exist, you should use the tLogCatcher component in the job and log them into database with tMssqlOutput component, check the option 'create table if not exist' on tMssqlOutput .
Best regards
Shong
Anonymous
Not applicable
Author

Hi Shong,
But when I run the job it DOES create the log table (this has always been the case for me using Talend).
My issue is that it creates the table in the dbo schema, not the log schema.
I tries creating the LogMessage table in the log schema before the job ran. Talend just ignored it and created aother one in the dbo schema.
The issue here is *not* whether o not Talend creates the log table. It is with talend apparently incorrectly using MS SQL schemas.
Please try it - you will see that Talend DOES create a log table, it just creates it in the wrong schema.
Anonymous
Not applicable
Author

I'm seeing the exact same behavior. I would like to have a flow meter and stats table in a schema called monitor, however using the 'Stats & Logs' tab of a job to log to a database does not obey the schema parameter on the database connection and instead uses dbo.
The offending code in the generated output appears to be:
globalMap.put("dbschema_connectionStatsLogs", "dbo");
_AnonymousUser
Specialist III

Hi,
I am facing exactly the same problem. Did you solve yours?