Problem Statement - We implement a lot of ELT solutions at our client side. Becuase majority of our code is in BTEQ it is becoming more and more difficult to identofy which BTEQ upserts/inserts which table. Is there some log in Teradata which will tell us which BTEQ script ran a particular query ?
Re: How to identify which BTEQ ran a particular Query
I doubt if there is any built-in solution for this .... but what you can do is pretty much possible .... couple methods can be:
- Have a log table (columns: Accessed_Table_Name, BTEQ_Name/ID, ActivityTimestamp), and put INSERT for that table with respective info in each BTEQ - Have one table (BTEQ_ID, Table_ID), other two tables for BTEQ details and Table details and then use them - Or, enable DBQL .... keep track of BTEQ execution times and then get the required info .... not a very good option though!