We may come across a situation when one of our process may take more time than expected which may eventually result in affecting other processes in UNIX.Suppose we have a script which is performing some task.However due to some constraint we want this task to be completed within some specific amount of time.Say we have time slots for all our tasks and if any task is exceeding the time allowed for that task , it should be terminated.So we will see how to kill a process if it is taking more time than specified time for that process.
Following code may help in achieving exactly what we’ve been discussing here : Continue reading
- Share this:
- Share
To execute a C program in UNIX , we need a file which have ‘C’ code in it.In this example we will print “My name is Nitin ‘Raj’ Srivastava”.Let us first create a C program file named MyName.c:To compile this C file we will give command cc MyName.c .The output of this command will be a.out file.We can rename this a.out file to something with more relevant name such as PrintName.Use command :
cp a.out PrintName
Now to execute PrintName just give PrintName(or the name to which you’ve renamed a.out file)
The output will be displayed : My Name is Nitin ‘Raj’ Srivastava Continue reading
- Share this:
- Share
We can use Teradata Qualify Row Number to have an alternate solution to Group by clause or using distinct.Qualify works on the final set of result rows.Qualify row number we can use in order to have a specific record or number of records.We will understand how Qualify Row Number is useful by taking example of a case when we have SCD2 implemented in table and we want to select latest value for any column.Eg: If there is an employee in a table emp who has changed his location from one city to other in the same company.For SCD2 we will add a new record with new location for the employee and date from which it is effective.If requirement is to select only the latest location for all the employees we can use Qualify Row Number to obtain the desired result.
SQL Query will be somewhat like : Continue reading | 5 Comments
- Share this:
- Share
Let us see the various help commands and their uses in Teradata.
HELP SESSION;
HELP DATABASE
HELP USER
HELP TABLE
;
HELP VOLATILE TABLE ;
- Share this:
- Share
Introduction
For any Data warehouse project, the most important aspect is to handle data properly. To handle data, first condition is that there must be some existing data. Teradata Data Generator helps in generating data for testing purpose for Teradata Database. Generally we manually cook few records in our database in order to test our code. However we will see if the requirement is to generate more than a million records then how Teradata Data Generator may automate the process and helps you in saving lot of time. Continue reading | 14 Comments
- Share this:
- Share
UNIX THREE COMMANDS YOU MUST KNOW
1) CONTROL M (^M)CHARACTERS
2) Search for FILES with specific keyword as content
3) Create a LOG file
This is one of the most common problem while working on UNIX and WINDOWS system.Whenever you move any file from WINDOWS system to UNIX you must make sure that you select transfer type as TEXT for your data files else CONTROL M (^M) characters will be appended at the end of each line.
You may use FILEZILLA or WINSCP for file transferring and select transfer type as TEXT.However if you want to use some script or UNIX code for removing control M characters then try this code : Continue reading
- Share this:
- Share
Let us begin with understanding what is a sequence number in a table.Sequence number in a database table is simply a column which has incremental value i.e. the new value will be last maximum value + 1 (in most cases it is incremented by 1 however you can change it also as per your requirement).Sequence numbers are generally used as surrogate keys.Surrogate keys can help us in recognizing any record in a table uniquely.Major difference between Primary Keys and Surrogate keys is Surrogate Keys don’t store much information and mostly it is a number value only.
So let us see now how to implement sequence number in any Database Table using simple SQL. Continue reading
- Share this:
- Share
Suppose you have a list of Files that you need to tar.All the files name are present in a single file.
eg. In one file FileList.txt you have several files : File1 , File2 ,File3 etc.
tr ‘\n’ ‘ ‘ FileList.txt FileList1.txt
mv FileList1.txt FileList.txt
sed ‘${/^$/!s/$/\ /;}’ FileList.txt
tar cvf MyTar.tar `head -1 FileList.txt` Continue reading | 2 Comments
- Share this:
- Share
Like Us on Facebook
My Favorite
Archives
- May 2012
- April 2012
- March 2012
- February 2012
- January 2012
- December 2011
- November 2011
- October 2011
- September 2011
- August 2011
- July 2011
- June 2011
- May 2011
- April 2011
- March 2011
- February 2011
- January 2011
- December 2010
- November 2010
- October 2010
- September 2010
- August 2010
- July 2010
- June 2010
- May 2010
- April 2010
- March 2010
- February 2010




Recent Comments