Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Scheduling queries using Queryman

Status
Not open for further replies.

Stip

MIS
Feb 27, 2003
3
NL
Hello Forum,

Does anyone know how to schedule queries using Queryman ?

I like to start a number of queries every week but want to do that automatic rather than manually.
Those queries depend on each other (e.g. is a table already created or updated before next SQL starts).
The output of a statement should be exported to a file which can be examined by a other scheduled proces which decides what the next step will be : start another query, repeat the previous, wait a while and check again or convert the resulting data to an Excel spreadsheet and sending it to the end user.

Does anyone have any ideas on how to achieve this ?

I am using Queryman and know that using the command line paramaters -c -f -s I can connect to Teradata and start a Query but what fails is automatically redirecting the output without using the GUI !

Thanx in advance for your input !
 
I do something similar, but I use SAS for that to query Teradata and output in Excel and email results to the end-user

Michael

 
Hello Dieter,

Thanks for your answer.
(Maybe you remember me from a TD OLAP Course you gave to OTTO-personnel in December 2000...).

Can you tell me a bit more about (getting started with) BTEQ ?
What is a cron job ?

Thanks in advance.

Hans van Stippent
 
Hello Michael,

Thanks for your answer.
That sounds interesting.

Can you tell me more about (getting started with) SAS ?

Thanx in advance.

Hans van Stippent
 
Hi Hans,
Do you have access to SAS. It is rather powerful and lets you use SQL commands. So all the queries that you would use against Teradata using Queryman can be done using a SAS program which can be scheduled to start at any time well into the future. The programs can be any length and can be set up to probably do all this (The output of a statement should be exported to a file which can be examined by a other scheduled proces which decides what the next step will be : start another query, repeat the previous, wait a while and check again or convert the resulting data to an Excel spreadsheet and sending it to the end user.)

Michael

 
Hi Hans,
BTEQ is probably very similar to the old tool used at OTTO, IIRC it was called "mapper".
BTEQ is part of the Teradata Client and availbale for almost every operating system. You'll find the manual "Basic Teradata Query Reference" it in the client manuals, Load and Unload Utilities.
It's mainly for submitting batch jobs.

And cron is a Unix utility to schedule jobs, so a scheduled shell-script with BTEQ-calls is often to do your kind of job.

Another solution and maybe the easiest for you is to use QueryMan 6.1 (it's a part of the TUT 7.0, but was renamed to "SQL Assistant").
There's a new command line option:
-e <name> Export the results of your query to a file named <name>. The format of this file is determined by the Export options currently in effect.

So ask your admins if they already have it. I was at OTTO two weeks ago and they still had QueryMan 6.0 installed, but they plan to upgrade to V2R5 in the near future.

Dieter
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top