InterviewSolution
This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
What's the purpose of this below query? |
|
Answer» SELECT HASHMAP (HASHBUCKET(HASHROW(emp_id))), COUNT(*) FROM Employee GROUP BY 1; With the above query, you can determine the number of rows in each AMP for a given database table. HASHAMP, HASHBUCKET, and HASHROW indicate the number of rows in the AMPs when used together. ConclusionAmong the most popular database management systems are Teradata. Employers are seeking candidates with extensive knowledge of its architecture and ability to use it efficiently. It is important to prepare for Teradata Interview Questions if you are seeking employment related to Teradata. It is true that every interview is different depending on the POSITION. In this article, we have provided the important Teradata Interview Questions and Answers for freshers and experienced, which will HELP you excel in your interview. There are questions on architectural basics, utilities related to FASTLOAD, Multiload, BTEQ, SQL, and Stored PROCEDURES. Ready to ace your Teradata interview now? |
|
| 2. |
What is the importance of UPSERT command in Teradata? |
|
Answer» Teradata enables update and insert operations to be PERFORMED simultaneously on a table from another table using UPSERT Command. UPDATES are made if the update condition matches in another table and unmatched rows are inserted into the table if the update condition does not match. UPDATE-ELSE-INSERT syntax: UPDATE department SET budget_amount = 60000 WHERE department_number = 600 ELSE INSERT INTO department(department_number, department_name, budget_amount, manager_employee_number) VALUES(600, 'Test Dept', 60000, NULL);This statement updates the ROW where department_number matches 600 to set budget_amount to 60000. In the EVENT that no match is found, a new row will be inserted. |
|
| 3. |
In Teradata, what is the purpose of using CASE Expression? |
|
Answer» When a CASE expression is used, each row is compared with a CONDITION or WHEN CLAUSE, and the result of the first MATCH is returned. Else, the result from the ELSE clause will be returned if there are no matches. Syntax: CASE <expression> WHEN <expression> THEN result-1 WHEN <expression> THEN result-2 ELSE Result-n END |
|
| 4. |
Explain the set operators in Teradata. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Answer» Operators such as SET combine the results from multiple SELECT statements. It may seem similar to Joins, but Joins combine columns from different tables, whereas SET operators combine rows from different tables. The following set operators are supported by Teradata SQL:
Example: Assume the student table below is TABLE1 and the attendance table is Table2.
1. UNION Following is a UNION query that combines the Roll_No values from both Table1 and Table2. SELECT Roll_No FROM Table1 UNION SELECT Roll_No FROM Table2;Output: Following is the output of the above query when executed. It does not includes duplicate values.
2. UNION ALL Here is an example of a UNION ALL statement. SELECT Roll_No FROM Table1 UNION ALL SELECT Roll_No FROM Table2;Output: Following is the output of the above query when executed. It includes duplicate values as well.
3. INTERSECT Here is an example of an INTERSECT statement. This command returns the Roll_No value that exists or present in both tables i.e., Table1 and Table2. SELECT Roll_No FROM Table1 INTERSECT SELECT Roll_No FROM Table2;Output: Following is the output of the above query when executed. The Roll_No105 is EXCLUDED because there is no such record in Table2.
4. MINUS/EXCEPT Here is an example of a MINUS/EXCEPT statement. SELECT Roll_No FROM Table1 MINUSSELECT Roll_No FROM Table2;Output: Following is the output of the above query when executed. Only Roll_No105 is INCLUDED because it is present in Table1 but there is no such record in Table2.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5. |
How to find duplicate records in a table? |
|||||||||||||||||||||||
|
Answer» The DISTINCT statement or GROUP BY statement can be USED to identify duplicate records in a table. SELECT DISTINCT column 1, column 2... FROM TABLENAME;OR SELECT column 1, column 2,... FROM tablename GROUP BY column 1, column 2....;Example: CONSIDER the FOLLOWING student table.
DISTINCT Here is an example of a DISTINCT statement. SELECT DISTINCT First_Name FROM tablename;Output: Following is the output of the above query when executed. With a distinct statement, duplicate values can be eliminated.
|
||||||||||||||||||||||||
| 6. |
Explain fallback in Teradata. |
|
Answer» As the name implies, the fallback feature stores the second copy of rows from a table on a different AMP, which is CALLED the Fallback AMP. In the event that ONE of the AMPs fails, the fallback rows are accessed. As a result, even if one of the AMPs fails, data can still be accessed since a fallback AMP is available. In the below diagram, you can SEE how a duplicate (fallback) copy of each row is stored in another AMPs. In AMP 0, a duplicate copy of the primary row of AMP1 (3) and AMP2 (6) is stored in fallback rows. Similarly, in AMP 1, a duplicate copy of the primary row of AMP0 (1) and AMP2 (5) is stored in the fallback row. All the AMPs stored fallback VALUES in the same way. |
|
| 7. |
List out the different forms of locks available in Teradata. |
|
Answer» Every object in the database is shared between multiple users who access the data simultaneously. If, for example, a user was updating a table and another user tried to view it simultaneously, the second user would receive inaccurate and inconsistent information. Locking mechanisms have been invented to avoid this kind of data inconsistency or data corruption. Having a lock PREVENTS multiple users from CHANGING the same data at the same TIME, reducing the possibility of data corruption/data inconsistency. In general, Teradata comprises four types of locks as follows:
|
|
| 8. |
What is PPI (Partitioned Primary Index)? |
|
Answer» As its name suggests, Partitioned Primary Indexes (PPI) are one of Teradata's powerful features that allow users to access a specific portion of a table instead of the WHOLE table. Essentially, PPI is an INDEXING mechanism that will help improve query performance. When used for data distribution, PPI works the same way as Primary Index, and partitions are created based on range or case as specified in the table. In partitioned primary indexes (PPIs), rows are sorted according to the partition number.
|
|
| 9. |
What is PDE (Parallel Data Extension)? |
|
Answer» Between the operating system and Teradata Database LIES a SOFTWARE layer called Parallel Database EXTENSIONS (PDE). This enhances the speed and scalability of Teradata Database by supporting parallelism ACROSS system nodes. Through PDE, Teradata Database is capable of:
|
|
| 10. |
List some of the most commonly used BTEQ scripts. |
|
Answer» The FOLLOWING are some COMMON BTEQ scripts:
|
|
| 11. |
Explain various table types supported by Teradata. |
|
Answer» The FOLLOWING types of tables are SUPPORTED by Teradata:
|
|
| 12. |
What's the best way to check the current version of Teradata? |
|
Answer» For determining the current version and release of software, there are several methods. You can view the current TERADATA Database version and release level VIA any console or CLIENT session by RUNNING the following query: SELECT * FROM DBC.DBCInfoV;In Teradata, the DBC.DBCINFO table contains information relevant to the Teradata release and version. Here,
|
|
| 13. |
What steps will you take if the Fast Load Script does not run in a reliable manner? |
|
Answer» In the event the Fast Load Script does not work for you, and only the error tables are available to you, then there are two WAYS to restart:
|
|
| 14. |
State difference between Teradata and Oracle. |
||||||||||
|
Answer» Among the most popular RDBMS systems are Teradata and Oracle:
|
|||||||||||
| 15. |
Mention the procedure via which we can run Teradata jobs in a UNIX environment. |
|
Answer» In ORDER to RUN Teradata utilities under UNIX, you simply need to EXECUTE them in the following manner:
|
|