Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

DB Connection Query

Hello,
I wish to run a SQL query in a DB Connection to retrive the required data.
I have successfully set up the DB Connection. I have successfully retrieved the table schemas. I have successfully set up the SQL Query in the Query repository for the DB Connection, then ran the query and the results returned from running this query are successful too. However when I place the DB Connection on the Job Designer and link it to a log component then run the job I receive the message of "No schema has been defined yet".
I am assuming it is possible to run a query that has been stored in the DB Connections Query repository, otherwise what would be the point of having these DB Connection sub-components. I just need someone to provide with some guidance on how to do this.
Thank you in advance
ajfarroll
Labels (2)
14 Replies
Anonymous
Not applicable
Author

Screenshot of the schema? If you schema says that the column is numeric then this behaviour is what you would see, maybe you need to correct the schema (ie the metadata schema in the Talend repository)?
Anonymous
Not applicable
Author

Thanks again for your assistance. I have checked the schema in Talend metadata repository and it all seems as it should be. The relevant field that appears to be causing the problem shown in the screen shot below is a string as expected. So why is there a conversion taking place when one is not necessary?
Thank you
AJFarroll
Anonymous
Not applicable
Author

You're still only providing minimal info here - are there other columns in the schema? What makes you think it's PARENT_CODE that is the problem? what is the complete query and the schema you're trying to map it into?
Anonymous
Not applicable
Author

Hi Toaster,
We know its PARENT_CODE column because we used a process of elimination. In the query we took out all the columns in the select statement except the first one and then added them in one by one. The query and Talend Job ran with every column until PARENT_CODE was added back in.
I will ask my manager about providing the complete query but not sure he will agree as it sensitive data.
Regards
AJFarroll
Anonymous
Not applicable
Author

OK - anyway the key thing is probably to reiterate that what you are trying to do is bread and butter stuff for any ETL, Talend included. If you are seeing odd behaviour it sounds like it is more to do with the query itself - debug it in the java code as it passes thru the jdbc layers and you should be able to see what's going wrong...