Beruflich Dokumente
Kultur Dokumente
Answer: No, because they become a single amp operation and my company didnt
encourage that.
Question.12 What is the use of having indexs on table?
Answer: For faster record search.
Question.13 Did you use Query man or SQL assistance?
Answer: SQL assistant 6.1
Question.14. I am updating a table in Bteq. It has to update a large
number of rows, so its really slow. What do you suggest?
Answer: In Teradata it is not recommended to update more than 1 million rows due
to journal space problems, if it is less than that and its slow in the Bteq, you might
want to add collect statistics statement before the update statement.
Question.15 Is it necessary to add? QUIT statement after a Bteq query
when I am calling it in a Unix environment?
Answer: Not necessary but it is good to add a QUIT statement after a query.
Question.16 There is a column with date in it. If I want to get just month
how It can be done? Can I use sub string?
Answer: Sub string is used with char fields. So it cannot be used. To extract month
from a date column, ex select extract (month from ). Same thing for year or day.Or
hour or minutes if its a time stamp (select extract (minute from column name).
Question.17 Whats the syntax of sub string?
Answer: SUBSTRING (string_expression, n1 [n2])
Question.18 Did you use CASE WHEN statement. Can you tell us a little
about it?
Answer: Yes. When a case has to be selected depending upon the value of the
expression.
Question.19 While creating table my DBA has FALLBACK or NO FALLBACK
in his DDL. What is that?
Answer: FALLBACK requests that a second copy of each row inserted into a table
be stored on another AMP in the same cluster. This is done when AMP goes down or
disk fails.[/sociallocker]
Use caches for lookup Aggregator use presorted port, increase cache
size, minimize input/out port as much as possible Use Filter wherever
possible to avoid unnecessary data flow.
Question.7 Explain lnformatica Architecture?
Answer: Informatica consist of client and server. Client tools such as Repository
-manager, Designer, Server manager. Repository data base contains metadata it
read by inforrnatica server used read data from source, transforming and loading
into target.
Question.8 What are the constants used in update strategy?
Answer: OD_INSERT, DD_UPDATE, DD_DELETE, DD REJECT.
Question.9 what is difference between connected and unconnected lookup
transformation?
Answer: Connected lookup return multiple values to other transformation Where
as unconnected lookup return one values If lookup condition matches Connected
lookup return user defined default values Where as unconnected lookup return null
values Connected supports dynamic caches where as unconnected supports static.
Question.10 What you will do in session level for update strategy
transformation?
Answer:
In session property sheet set Treat rows as Data Driven .
Question.11 What are the port available for update strategy , sequence
generator, Lookup, stored procedure transformation?
Answer:
Transformations
Port
Update strategy
Sequence Generator
Lookup
Input, Output
Output only
Input, Output, Lookup, Return
Stored Procedure
Input, Output
Answer: There is an option to run the stored procedure before starting to load the
rows.
Question.4 What is difference between view and materialized view?
Answer: Views contains query whenever execute views it has read from base table
Where as M views loading or replicated takes place only once, which gives you
better query performance .refresh m views 1.on commit and 2. on demand
(Complete, never, fast, force) .
Question.5 What is bitmap index why its used for DWH?
Answer: bitmap for each key value replaces a list of rowids. Bitmap index more
efficient for data warehousing because low cardinality, low updates, very efficient
for where class
Question.6 What is star schema? And what is snowflake schema?
Answer: The center of the star consists of a large fact table and the points of the
star are the dimension tables. snowflake schemas normalized dimension tables to
eliminate redundancy. That is, the Dimension data has been grouped into multiple
tables instead of one large table.
Star schema contains demoralized dimension tables and fact table, each primary
key values in dimension table associated with foreign key of fact tables.
Here a fact table contains all business measures (normally numeric data) and
foreign key values, and dimension tables has details about the subject area.
Snowflake schema basically a normalized dimension tables to reduce redundancy in
the dimension tables .
Question.7 Why need staging area database for DWH?
Answer: Staging area needs to clean operational data before loading into data
warehouse.
cleaning in the sense your merging data which comes from different source .
Question.8 What are the steps to create a database in manually?
Answer: create OS service and create init file and start data base no mount stage
then give create data base command.
Question.9 Difference between OLTP and DWH?
Answer: OLTP system is basically application orientation (eg, purchase order it is
functionality of an application)
Where as in DWH concern is subject orient (subject in the sense customer, product,
item, time) .
Question.10 What is the significance of surrogate key?
Answer: Surrogate key used in slowly changing dimension table to track old and
new values and its derived from primary key.
Question.11 What is slowly changing dimension. What kind of scd used in
your project?
Answer: Dimension attribute values may change constantly over the time. (Say for
example customer dimension has customer_id ,name, and address, customer
address may change over time.
Question.12 Row will you handle this situation?
Answer: There are 3 types, one is we can overwrite the existing record, second
one is create additional new record at the time of change with the new attribute
values. Third one is create new field to keep new values in the original dimension
table.
Question.13 What is difference between primary key and unique key
constraints?
Answer: Primary key maintains uniqueness and not null values
Where as unique constrains maintain unique values and null values
Question.14 What are the types of index? And is the type of index used in
your project?
Answer: Bitmap index, B-tree index, Function based index, reverse key and
composite index.
We used Bitmap index in our project for better performance.
Question.15 A table have 3 partitions but I want to update in 3rd
partitions how will you do?
Answer: Specify partition name in the update statement. Say for example Update
employee partition(name) a, set a.empno=10 where ename=Ashok
Question.16 When you give an update statement how memory flow will
happen and how oracles allocate memory for that?
Answer: Oracle first checks in Shared sql area whether same Sql statement is
available if it is there it uses. Otherwise allocate memory in shared sql area and
then create run time memory in Private sql area to create parse tree and execution
plan. Once it completed stored in the shared sql area wherein previously allocated
memory .
Question.17 Write a query to find out 5th max salary? In Oracle, DB2, SQL
Server
Answer: Select (list the columns you want) from (select salary from employee
order by salary) Where rownum<5
Question.18 When you give an update statement how undo/rollback
segment will work/what are the steps?
Answer: Oracle keep old values in undo segment and new values in redo entries.
When you say rollback it replace old values from undo segment. When you say
commit erase the undo segment values and keep new vales in permanent.
Question.19 What is DTM? How will you configure it?
Answer:
DTM transform data received from reader buffer and its moves
transformation to transformation on row by row basis and it uses transformation
caches when necessary.[/sociallocker]
Answer: UPPER Function is used to convert all characters in a column to the same
characters in upper case.
Question.5 What does a LOWER Function do?
Answer: LOWER function is used to convert all characters in a column to the
lower case characters.
Question.6 How do you see a DDL for an existing table?
Answer: By using show table command.
Question.7 Which is more efficient GROUP BY or DISTINCT to find
duplicates?
Answer: With more duplicates GROUP BY is more efficient, if only a few duplicates
exist DISTINCT is more efficient.
Question.8 Syntax for CASE WHEN statement?
Answer: CASE
value_expression_1
WHEN
value_expression_n
THEN
scalar_expression_n END;
Question.9 Whats the difference between TIMESTAMP (0) and TIMESTAMP
(6)?
Answer:
TIMESTAMP (0) is CHAR (19) and TIMESTAMP (6) is CHAR (26)
Everything is same except that TIMESTAMP (6) has microseconds too.
Question.10 How do you determine the number of sessions?
Answer:
Teradata performance and workload
Client platform type, performance and workload
Channel performance for channel attached systems
Network topology and performance for network attached systems.
Volume of data to be processed by the application.
Question.11 What is node? How many nodes and AMPs used in your
previous project?
Answer: Node is a database running in a server. We used 318 nodes and each
node has 2 to 4 AMPS.
Question.12 What is a clique?
Answer: Clique is a group of disk arrays physically cabled to a group of nodes.
Question.13 Interviewer explained about their project (Environment,
nature of work)?
Answer: Listen to them carefully so that at the end of the interview you can ask
questions about the project when you are given a chance to ask questions.
of the project.
Question.14
Answer: FastLoad uses multiple sessions to quickly load large amount of data on
empty table. MultiLoad is used for high-volume maintenance on tables and views.
It works with non-empty tables also. Maximum 5 tables can be used in MultiLoad.
Question.15 Have you used procedures?
Answer: No. I have not used procedures. But I have expertise knowledge writing
procedures. My company have not encouraged me to write procedures because it
becomes single AMP operation, as such uses lot of resources and expensive in terms
of resource and time.
Question.16 What is the purpose of indexes?
Answer: An index is a mechanism that can be used by the SQL query optimizer to
make table access more performant. Indexes enhance data access by providing a
more-or-less direct path to stored data and avoiding the necessity to perform full
table scans to locate the small number of rows you typically want to retrieve or
update.
Question.17 What is primary index and secondary index?
Answer:
Primary index is the mechanism for assigning a data row to an AMP
and a location on the AMPs disks. Indexes also used to access rows from a table
without having to search the entire table.
Secondary indexes enhance set selection by specifying access paths less frequently
used than the primary index path. Secondary indexes are also used to facilitate
aggregate operations. If a secondary index covers a query, then the Optimizer
determines that it would be less costly to accesses its rows directly rather than
using it to access the base table rows it points to. Sometimes multiple secondary
indexes with low individual selectivity can be overlapped and bit mapped to provide
enhanced
Question.18 Why primary and secondary index is used?
Answer: Refer answer from previous question.
Question.19 What are the things to considered while creating secondary
index?
Answer: Creating a secondary index causes Teradata to build a sub-table to
contain its index rows, thus adding another set of rows that requires updating each
time a table row is inserted, deleted, or updated. Secondary index sub-tables are
also duplicated whenever a table is defined with FALLBACK, so the maintenance
overhead is effectively doubled.[/sociallocker]
Answer: An inner join gets data from both tables where the specified data exists in
both tables.
An outer join gets data from the source table at all times, and returns data from the
outer joined table ONLY if it matches the criteria.[sociallocker]
Question.4 What is multi Insert?
Answer: Inserting data records into the table using multiple insert statements.
Putting a semi colon in front of the key word INSERT in the next statement rather
than terminating the first statement with a semi colon achieves it.
Insert into Sales select * from customer
Insert into Loan select * from customer;
Question.5 Is multi insert ANSI standard?
Answer: No.
Question.6 How do you create a table with an existing structure of
another table with data and with no data?
Answer: Create table Customer dummy as Customer with data / with no data;
Question.7 What is the opening step in Basic Teradata Query script?
Answer: Logon tdipid/username, password.
Question.8 You are calling a Bteq script, which drops a table and creates a
table. It will throw an error if the table does not exist. How can you do it
without throwing the error?
Answer: You can it by setting error level to zero before dropping and resetting the
error level to 8 after dropping.
Question.9 ERRORLEVEL (3807)
Answer: SEVERITY 8;
Question.10 Can you FastExport a field, which is primary key by putting
equality on that key?
Answer: No.
Question.11 Did you write stored procedures in Teradata?
Answer: No, because they become a single amp operation and my company didnt
encourage that.
Question.12 What is the use of having indexs on table?
Answer: For faster record search.
Question.13 Did you use Query man or SQL assistance?
Answer: SQL assistant 6.1
Question.14. I am updating a table in Bteq. It has to update a large
number of rows, so its really slow. What do you suggest?
Answer: In Teradata it is not recommended to update more than 1 million rows due
to journal space problems, if it is less than that and its slow in the Bteq, you might
want to add collect statistics statement before the update statement.
Question.15 Is it necessary to add? QUIT statement after a Bteq query
when I am calling it in a Unix environment?
Answer: Not necessary but it is good to add a QUIT statement after a query.
Question.16 There is a column with date in it. If I want to get just month
how It can be done? Can I use sub string?
Answer: Sub string is used with char fields. So it cannot be used. To extract month
from a date column, ex select extract (month from ). Same thing for year or day.Or
hour or minutes if its a time stamp (select extract (minute from column name).
Question.17 Whats the syntax of sub string?
Answer: SUBSTRING (string_expression, n1 [n2])
Question.18 Did you use CASE WHEN statement. Can you tell us a little
about it?
Answer: Yes. When a case has to be selected depending upon the value of the
expression.
Question.19 While creating table my DBA has FALLBACK or NO FALLBACK
in his DDL. What is that?
Answer: FALLBACK requests that a second copy of each row inserted into a table
be stored on another AMP in the same cluster. This is done when AMP goes down or
disk fails.[/sociallocker]