I have some teradata codes which I want to automate. It should be done in a way that they can execute themselves on a specific date/time of a month.
Any help will be appreciated.
You need to put your SQL code inside Bteq as said by Ulrich. BTEQ is a Teradata sql processing tool, if you need further information about Bteq, do let me know. if you have an idea of Bteq then put your code in Bteq and use some job schedular to automate the Bteq script calls.
There are numerous job schedulars available in market, a list is available at
You can also use linux feature as given at below URL
You can read the following blog to have a basic idea of Bteq
I have the same enquiry: I want to schedule my Teradata query to run every day at a given time but I am not sure I have understood the approach with BTEQ... Could you please elaborate more about this solution? An example would be more than appreciated.
Say if I need to refresh the content of my table at 1:00 AM every friday,
I will use the following btq script (which includes insert query) and unix scheduler like cron:
btq script example :
.logon <teradata serverName>/<UserId>,<Password>;;
drop table DB.<Table>;
create table DB.<Table>
.IMPORT DATA FILE=/<path to file>/in.dat
USING storeId (smallint)
insert into DB.<Table>(store_Id) values (:storeId)
CRON Example :
00 1 * * 5 sh /<path to your script>/Script.sh 1>>/<path to log>/Script.log 2>&1
1 - Hour
* - Every
5 - 5th day of week (Starting from Monday so in this case Friday)