0% found this document useful (0 votes)
3 views

Teradata Interview Questions

The document provides a comprehensive overview of Teradata, including its features, utilities, and various interview questions and answers related to the platform. Key topics covered include Teradata's architecture, performance tuning, string manipulation functions, and the differences between Teradata and Oracle. Additionally, it discusses various types of tables, caching, and the use of ETL tools in conjunction with Teradata.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

Teradata Interview Questions

The document provides a comprehensive overview of Teradata, including its features, utilities, and various interview questions and answers related to the platform. Key topics covered include Teradata's architecture, performance tuning, string manipulation functions, and the differences between Teradata and Oracle. Additionally, it discusses various types of tables, caching, and the use of ETL tools in conjunction with Teradata.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 11

Easy Teradata Interview Questions

1. What is the Teradata tool?


Teradata is an RDBMS or Relational DataBase Management System. It is an open-
source system. It is able to run on different operating systems, like Windows,
Linux, and macOS. Teradata helps big organizations manage large data
warehouse operations to improve their performance. The key feature of this tool
is Parallelism or parallel execution. Using the parallel execution concept, you can
execute multiple data warehouse operations simultaneously. You can also break a
single task into smaller parts and process them parallelly using Parallelism.

2. What is the importance of using Teradata?


Following are the reasons for using Teradata:
 The system can handle, i.e., storing and processing a large amount of
data, even more than 50 petabytes.

 You can integrate Teradata with various business intelligence (BI) tools.

 Teradata supports OLAP or Online Analytical Processing, allowing users to


perform complex analytics on their data.

 Teradata also offers a comprehensive set of services concerning data


warehousing, like cloud-based and hardware-based data warehousing,
business analytics, etc.

 Teradata supports SQL or Structured Query Language as a means of


interacting with data that is stored in the tables.

3. What are Teradata's newest features?


Following are some of the newest features of Teradata:
 Unlimited Parallelism,

 Linear Scalability,

 Shared Nothing Architecture,

 Connectivity,

 Structured Query Language,


 Mature Optimizer,

 Low TCO (Total Cost of Ownership).

4. What are Teradata utilities? Can you name some utilities?


Teradata utilities are tools that can be used to load as well as export data to and
from the Teradata database. Some of the utilities are:
 Basic Teradata Query,

 Fastload,

 Multi-load,

 Fastexport, and

 Teradata Parallel Data Pump or TPump.

5. Can you explain different string manipulation functions and


operators in Teradata?
We can use String functions to manipulate strings in Teradata. It supports some
of the standard string functions. It also supports Teradata extensions to standard
functions.
 SUBSTRING: It extracts a portion from a long string based on the choice.
For example,

SELECT SUBSTRING('CodingNinjas' FROM 1 FOR 4);

Output:
Codi

 POSITION: It is used to locate a character in a String (ANSI Standard). For


example,

SELECT POSITION("o" IN "CodingNinjas");

Output:
2
 TRIM: It removes all the blank space from a string. For example,

SELECT TRIM(" CodingNinjas ");

Output:
CodingNinjas

 UPPER: It converts the string into uppercase. For example,

SELECT UPPER("CodingNinjas");

Output:
CODINGNINJAS

 LOWER: It converts the string into lowercase. For example,

SELECT LOWER("CODINGNINJAS")

Output:
codingninjas

6. Why doesn't Multi-load support a Unique Secondary Index (USI)


instead of a Non-Unique Secondary Index)?
All AMP (Access Module Processors) can function independently, thanks to
Teradata. With USI, the index subtable would need to be present on several
AMPs, requiring AMP-to-AMP communication. However, NUSI would place the
index subtable on the same AMP as the data row, allowing that AMP to be
handled separately. For this reason, multi-load supports NUSI.
Also see, Kotlin Interview Questions

7. How do you restart MLOAD Client System when it fails?


Whether a Teradata MultiLoad job halted during the application phase (applying
all DML (Data manipulation language ) procedures) or was terminated due to a
client system failure, the job can be restarted.
 If the Teradata MultiLoad job was interrupted before or after the
application phase, you could restart the job precisely as it was without
making any modifications to the script. Teradata MultiLoad establishes its
stopping point using the entries from the restart log database and starts
processing there.

 If a Teradata MultiLoad job is stopped or the client system fails during the
application stage, you must resolve the issue that led to the failure and
then restart the job.

8. How do you restart MLOAD Teradata Server after its execution?


Typically, the process starts from the most recent checkpoint and after executing
the MLOAD script. Then the server is restarted.

9. What do you mean by performance tuning?


To be more precise, Teradata Performance tuning includes locating and
eliminating all database bottlenecks. Although the bottleneck delays data
retrieval from the database, it does not cause mistakes. Without database
performance tuning, a business can see inconsistent query results, making
accessing its data more difficult and leading to additional problems.

10. What do you mean by Skewness in Teradata? What is its usage?'


In Teradata, "Skewness" is the row distribution on AMPs (Access Module
Processors). In data distribution, the Skew Factor is the distribution of table data
among AMPs. A skewed factor of 0 denotes an equal data distribution among the
AMPs. When data is highly skewed, it indicates that the distribution is not uniform
and that some AMPs contain more rows while others have relatively few. This
case's high Skew Factor (unequal data distribution) impacts Teradata's
Parallelism and performance.

Medium Teradata Interview Questions


11. What is Spool space in Teradata? Why is it used?
Spool space is the unused space in the system where intermediate results of a
SQL query are held. Users lacking spool space are unable to execute queries. The
number of AMPs determines how much spool space is allocated, although each
AMP only has access to a portion of the total. The user will be informed that they
have run out of spool space if the per AMP limit is exceeded.

12. What do you mean by nodes in Teradata?


The fundamental components of the Teradata System are nodes. Individual
servers make up a Teradata system's nodes. Each node has its own Teradata
RDBMS software, operating system, CPU, RAM, and disk space.

13. Can you name a few ETL (Exact, Transform, and Load) tools under
Teradata?
There are many ETL (Extract, Transform, and Load) tools that are frequently used
in Teradata as follows:
 Informatica,

 DataStage, and

 SSIS (SQL Server Integration Services).

14. Is Teradata an ETL (Exact, Transform, and Load) tool or a database?


Teradata is not an ETL (Extract, Transform, and Load) tool. Teradata is a free and
open-source RDBMS (relational database management system) that works with
Windows, Linux, and other operating systems. Teradata is an RDMS or relational
database management system that can handle data loads up to terabytes.
Large-scale data warehouse applications can be run on the system.

15. Can you tell me some benefits of using ETL tools over Teradata?
ETL stands for three separate database management tasks: extract, transform,
and load. Compared to Teradata, ETL tools have a few advantages, such as:
 It supports multiple heterogeneous sources and destinations of data.

 The ETL tools offer a complete GUI that makes controlling databases'
debugging procedures easier.

 ETL tools also allow you to reuse components. As a result, if the central
server is updated, all associated applications that use that server are also
updated automatically.

 ETL tools can pivot and de-pivot (turn rows into columns) (transform
columns into rows).

16. What is Caching in Teradata?


In Teradata, caching is the process of keeping frequently used Data and
Information in the cache memory so that, when the data is needed again, it may
be retrieved immediately from memory rather than requiring the application to
generate it again. In Teradata, caching always happens in the same order;
therefore, changes are not frequent. Many applications frequently share caches.

17. What do you mean by Channel Driver?


A channel driver serves as a conduit of communication between PEs and the
application programs that operate on channels connected to clients. By acting as
a conduit between the Parse Engine and programs connected to network clients,
the Teradata Gateway functions similarly to a channel driver.

18. What are the different types of tables supported by Teradata?


Following are the types of tables that Teradata supports:
 Permanent Table: This table holds all of the user-inputted data and
keeps it on file forever after it has been entered. Permanent tables allow
users and sessions to share the same material. It's the default table.

 Volatile Table: When information is added to a volatile table, it is only


kept for the duration of the current user session, and the table is
immediately deleted once the user session has ended. They are typically
employed to hold intermediate data during data transformation.

 Global Temporary Table: Global temporary tables are an additional class


of permanent tables. For the duration of the entire application, this kind of
table maintains the globally used values, and the user's session
determines its lifespan. The table is dumped or removed after the session.

 Derived Table: Derived tables have the shortest lifetime of all the tables.
These tables are where queries' intermediate results are kept after
execution. During a query, tables are built, utilized, and then deleted.

19. What do you mean by PDE (Parallel Data Extension)?


Parallel Database Extension or PDE is a software layer between the operating
system and Teradata Database. It enhances the speed and Scalability of a
Teradata Database by providing Parallelism across system nodes. Through PDE,
Teradata Database is capable of:
 Parallel processing,

 Prioritizing and managing Teradata Database workloads,

 Managing memory, I/O (Input/Output), and messaging system interfaces


consistently across different OS platforms, etc.

20. Can you explain the fallback feature in Teradata?


In Teradata, the fallback feature protects the data of the table. It stores the
second copy of the rows of the table on another AMP known as the Fallback AMP.
When one AMP fails, the fallback rows are used. Due to the fallback feature, if
any of the AMPs fails, data can still be retrieved because a fallback AMP is also
available.
Must Read WCF Interview Questions
Hard Teradata Interview Questions
21. How can you run Teradata jobs in a UNIX Environment?
If you want to run Teradata utilities in a UNIX Environment, you need to run them
in the following order:
BTEQ - $Sh> BTEQ< [ Script path]/TEE< LOGFILE PATH > (OR) BTEQ - $Sh>
BTEQ< [ Script path > [LOG FILE PATH]

FLOAD - Sh> FASTLOAD< [ Script path]/TEE< LOGFILE PATH > (OR) FLOAD -
$Sh> FASTLOAD < [ Script path > [LOG FILE PATH]

MLOAD - $Sh> Mload < [ Script path]/TEE< LOGFILE PATH > (OR) MLOAD - $Sh>
Mload < [ Script path > [LOG FILE PATH]

TPUMP - $Sh> TPUMP < [ Script path]/TEE< LOGFILE PATH > (OR) TPUMP - $Sh>
TPUMP < [ Script path > [LOG FILE PATH]

FEXP - $Sh> FEXP < [ Script path]/TEE< LOGFILE PATH > (OR) FEXP - $Sh> FEXP
< [ Script path > [LOG FILE PATH]

22. Can you explain the difference between Teradata and Oracle?

S.No Teradata Oracle


.

1. Due to the shared-nothing architecture, The architecture of Oracle is


the disk, Teradata nodes, and AMPs based on Share Everything
(Access Module Processors) architecture.
in this database are all separate and do
not share resources with anybody else.

2. Every AMP has a slice of table data. Table partitioning is possible.

3. Every AMP works in parallel to get the Parallelism is driven by hints


S.No Teradata Oracle
.

required data. in the SQL Statements.

4. For OLAP Applications. For OLTP and OLAP


Applications.

Learn more, Html interview questions

23. What will you do if the Fast Script is not running reliably?
If the Fast Load Script is not working reliably and you only have the error tables,
then there are two ways to restart:
 Rerunning the old file: You must be sure not to remove the error tables
altogether. Instead, you can fix the errors in the file or script and then
execute the file again.

 Running a new file: You can also restart using the ending loading and
beginning statements. Due to this, you can remove the lock that was
present on the target table. You can also remove the record from the fast-
log table. If this all works fine, you can rerun the whole script. You can also
drop the table and try recreating it.

24. How can you verify the current version of Teradata?


There are some methods if you want to determine the current version as well as
the release of the software. You can check the current Teradata Database version
and release level via any client session or any console just by running the
following Query:
SELECT * FROM DBC.DBCInfoV;

In Teradata, the DBC.DBCINFO table has the information relevant to the Teradata
release and version. Here,
 DBC stands for Database computer.

 DBCInfoV is the table where database information is stored.

25. Can you name some commonly used BTEQ scripts?


The following are some standard BTEQ scripts:
 LOGON: It helps you to log in to the Teradata system.
 ERRORCODE: It returns the status code of the last Query performed.

 ACTIVITYCOUNT: It details the number of rows affected by the previous


Query performed.

 DATABASE: It sets the default database.

 RUN FILE: This command helps to execute the Query that is present in a
file.

 LABEL: It specifies a label for a set of SQL commands.

 GOTO: It turns the control over to a label.

 IMPORT: It specifies the path to the input file and starts the import to the
input file.

 LOGOFF: It terminates all sessions and logs you off from the database.

 EXPORT: It specifies a path to the output file and starts exporting to the
output file.

26. What do you mean by PPI (Partitioned Primary Index)?


Teradata has a very powerful feature known as Partitioned Primary Index. PPI is a
feature that enables users to use a specific part of the table rather than using
the complete table. PPI is an indexing system that will enhance query
performance. PPI divides data according to range or case as specified in the
database, working similarly to how Primary Index performs when used for data
distribution. PPIs (partitioned primary indexes) arrange rows according to the
partition number.
 Instead of running a full table search, PPI can be used to restrict access to
necessary partitions.

 PPI eliminates the need for secondary indexes and extra I/O maintenance.

 It makes a part of a large table comfortably accessible.

 PPI makes it simple to update data in a table and add new data.

27. How can you find the duplicate records present in a table?
We can use the "DISTINCT" or the "GROUP BY" statement to identify the
duplicate records in a table. We can either do this:
SELECT DISTINCT column 1, column 2... FROM tablename;

Or this:
SELECT column 1, column 2,... FROM tablename GROUP BY column 1, column
2....;

28. What is the function of CASE Expression in Teradata?


A "CASE" expression compares each row with a condition using the "WHEN"
clause. It returns the result of the first match. If the condition is not matching, it
returns the result of the "ELSE" clause.
Syntax:
CASE <expression>
WHEN <expression> THEN result-1
WHEN <expression> THEN result-2
ELSE
Result-n
END

29. What is the benefit of using the UPSERT command in Teradata?


In Teradata, you can perform "update" and "insert" operations simultaneously on
a table from another table using the "UPSERT" Command. The updates are only
done if the update condition in another table matches completely. If the condition
does not check, the unmatched rows are inserted into the table.

30. What do you think this Query does?


SELECT HASHMAP (HASHBUCKET(HASHROW(emp_id))), COUNT(*) FROM
Employee GROUP BY 1;
The given Query enables us to find the number of rows in each AMP in a specific
database. When we use HASHBUCKET, HASHAMP, and HASHROW together, they
show the number of rows in the AMPs.
 HASHRAMP: It returns the ID number of the primary AMP corresponding
to the specified hash bucket number.
 HASHBUCKET: It returns the hash bucket number corresponding to the
row hash value that has been specified.

 HASHROW: It returns the row hash value in hexadecimal for an


expression or multiple expressions in a sequence.

You might also like