Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have some 40 logics to create a single sql table over talend. I have mentioned the queries based on 40 logics in an excel sheet and pass it through iteration to tmssqlinput component.
Instead of that can we mention all those logics and queries in talend component (tmssqlinput) itself?
What is the difference between mentioning queries in excel and talend component?
Note : From my understanding, we have to avoid using queries in talend component (tmssqlinput). Need clarification for this.
Hi,
You can write complex queries in Talend SQL Input component itself. It all depends on our coding style you want to follow in your organisation. Some organisations will add the SQL queries directly in the tDBInput components. Some other scenarios will require the query to be formulated only during runtime. In this case, we will dynamically generate the query during run time.
There are cases where based on conditions of the flow, the query will change and we need to run specific query based on the condition. In this condition also, we will dynamically formulate the query during runtime.
In your case, if the query is static even though it is having multiple logic, then you can very well add them in the tDBInput component itself. But if the condition is determining the query during runtime (based on the value in excel), then you will have to generate the query pattern during run time.
But there is no hardfast rule that you need to avoid the queries in Talend component. End of day, the query will be executed in DB engine and the performance of the query is determined by how good or bad is the underlying SQL. If the SQL is optimized, you will get faster results. If the SQL optimization is bad, it will take lot of time to get result set for your query. Talend has no role in determining the performance of it as it is just a mediator between you and DB 🙂
Warm Regards,
Nikhil Thampi
Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂