Teradata Random 3 — Questions and Answers
Question 1: In Teradata, what does a Derived Table refer to?
- A table created from a MERGE statement
- A subquery in the FROM clause used as a temporary result set (Correct answer)
- A permanent table with generated columns
- A fallback copy of a base table
Correct answer: A subquery in the FROM clause used as a temporary result set
A derived table is an inline subquery placed in the FROM clause that produces a temporary result set used by the outer query.
Question 2: Which Teradata join strategy scans both tables on each AMP and performs the join locally without data redistribution?
- Merge Join
- Product Join
- Row Hash Join (Correct answer)
- Exclusion Join
Correct answer: Row Hash Join
A Row Hash Join occurs when both tables are co-located by their PI, so matching rows reside on the same AMP and no redistribution is needed.
Question 3: What is the maximum number of columns allowed in a Teradata Primary Index definition?
- 4
- 8
- 16 (Correct answer)
- 64
Correct answer: 16
Teradata allows up to 16 columns in a composite Primary Index definition.
Question 4: Which Teradata object type is most similar to a stored procedure but returns a value to the calling statement?
- Macro
- Trigger
- User-Defined Function (UDF) (Correct answer)
- View
Correct answer: User-Defined Function (UDF)
A User-Defined Function (UDF) executes logic and returns a scalar or aggregate value that can be used within a SQL expression.
Question 5: In Teradata Workload Management, what does a Workload Definition (TDWM) primarily control?
- Which users can create tables
- Resource allocation and priority for queries based on classification criteria (Correct answer)
- Network bandwidth between nodes
- AMP disk striping configuration
Correct answer: Resource allocation and priority for queries based on classification criteria
TDWM workload definitions classify incoming requests and assign resource priorities, concurrency limits, and throttles to manage system throughput.
Question 6: What does the Teradata SAMPLE clause do in a SELECT statement?
- Returns an exact percentage of rows based on a WHERE filter
- Returns a random subset of rows from a result set (Correct answer)
- Sorts rows randomly before returning
- Limits rows by partition value
Correct answer: Returns a random subset of rows from a result set
The SAMPLE clause returns a random subset of rows, either by a fixed count or a percentage, from the result set.
Question 7: Which Teradata feature enables temporal queries using system-time or transaction-time periods?
- Temporal Tables (Bitemporal) (Correct answer)
- Volatile Tables
- Derived Tables
- Journal Tables
Correct answer: Temporal Tables (Bitemporal)
Teradata's bitemporal tables support both system-time (when recorded) and valid-time (business time) dimensions for historical querying.
In Teradata, what does a Derived Table refer to?