Common Technical Interview Questions for a SQL/BI Professional

advertisement
Common Technical Interview Questions for a SQL/BI Professional Position
Because BI is such a wide and diverse area, it’s not only possible but likely that someone might be asked
to demonstrate knowledge in many different areas. But before I even get to the actual items, here are
some other issues to be aware of:
First, please, REVIEW all prior labs we did in class, review your projects and how you put them together,
and review any videos. For the SQL and MDX classes, review the code samples we covered – all of them
relate to topics that you might be tested on. Also, go back and review your tests, as some test
questions are based on technical interview questions. I cannot stress these points enough.
Second, when I say “demonstrate knowledge”, I’m not just talking about a short answer: I’ve been on
both sides of the interview table, and I know that a candidate may be asked to demonstrate a concept
on a whiteboard. For instance, the interviewer might describe a specific scenario that calls for a type 2
Slowly Changing Dimension, and ask the candidate to map out a solution. The interviewer is evaluating
several things: the candidate’s thought process (including whether the candidate recognizes the
situation to begin with) and how the candidate goes about describing a possible solution.
If you’re on-site, you might be asked to create a brief sample. This is to make sure you can “play the
piano” in addition to stating where the piano keys are located. You might be asked to create a simple
report, or create a basic SSIS package, or write a T-SQL code sample, with the person watching. Yes, it
can be unnerving, but the more you’re prepared for it, the better your chances. I know of situations
where someone needed to demonstrate transaction isolation levels by opening up two query windows
and simulating a locking scenario with a “User A” and “User B” situation. And even if you’re not asked
to do that, the preparation might still help in other areas.
Third, take these types of questions as an opportunity to showcase your experiences. You’re
auditioning - you’re on center stage – and you want them to feel comfortable with your ability to
communicate an answer/solution. Don’t hesitate to cleverly pull in relevant details from other things
you’ve built and don’t be shy about giving them “too much” relevant information. If the interviewer
feels you’ve nailed the question, he/she will simply stop you and say something like , “Ok, fine….good,
next question…”
Fourth, and very important, try to be aware of the technical knowledge of the person interviewing you.
This might seem strange to say – won’t the person doing the technical interviewing be a technical
person themselves? Not necessarily! In some cases, when a company is using a recruiter, the technical
team will give a recruiter a list of questions to ask a candidate. This is done to avoid wasting a technical
manager’s time – but it also means that a non-technical person is asking technical questions, and
therefore probably won’t be able to interpret an answer. In this process, the recruiter is given a list of
questions and “stock” answers: this means you could provide an acceptable response that isn’t exactly
the way the “expected” answer is written.
This is a tricky situation…and while it might seem like an unfair situation, “it is what it is”. So you have to
really think about each question posed to you and how a generic answer might have been prepared.
Yes, it does sound like you have to “read the mind” of someone. I’m not saying all technical interviews
are like this – but in some cases, this can happen. If you’re in this spot and you’ve given an answer that
you know is acceptable, but the recruiter reacts differently, see if you can quickly adjust.
Finally, before going into the specifics of each technology – a final word to prepare everyone. For the
technologies you’re interviewing for, make sure you’re able to quote each major piece of functionality in
the tools, and what they do. For instance, the question might be, “name the options (horizontal tabs)
from left to right in the SSAS cube editor, and what they do”. So the answer would be cube structure
(and what it does), dimension usage, calculations, KPIs, Actions, Partitions, etc. Now imagine that same
question for the dimension editor….or in SSIS, for the control flow, etc. The interviewer might or might
not expect you to get EVERY one – but someone who struggles immediately will not have good odds of
succeeding.
Some will remember that I’ve often used the analogy that the BI MP is like Medical school. Well,
imagine a medical exam that asks you to name the bones and muscles in the leg and what they do.
Same concept!!!
OK, here are the categories and specific topics/questions you should prepare for (starting on the next
page). I’ve listed ones that I’ve seen, that friends/colleagues of mine have seen, that former students
have told me about, and ones that I’ve read. That doesn’t mean there aren’t other questions out there
– you could Google on “SSIS Interview questions” and find some that are also on my list and some that
aren’t.

SQL Server 2005 /2008
o
o
o
General database concepts and general SQL technology questions
 What is a clustered index and why would you need one?
 What is a primary key
 What is an identity key
 What is a UniqueIdentifier (and the differences between a GUID and an identity
key)
 Why might you split a database into partitions and filegroups
 What is a foreign key and how you do you create foreign key constraints
 What’s the difference between a Char(50) and a Varchar(50)
 Describe the common SQL Server 2005 Data Types ["what's the difference between
a smallint and int, or between a bigint and tinyint"]
 Execution Plans
 How do you view an execution plan
 Name some tasks/items you might see in an execution plan (index seek,
index scan, Bookmark Lookup, etc.) and which ones are more efficient than
others
 What steps might you take to optimize a query?
SQL Server Agent (you can use agent to schedule packages, execute reports, or even run
different SQL jobs on a schedule)
T-SQL questions
 Basic T-SQL syntax:
 Write a basic query to join two tables by a common key
 Write a query to show all the customers in a customer table that don’t have
an order in the orders table (where the orders table contains a customer
key)
 Write a query that shows all the customers in a customer table who have
more than five orders in an order table.
 More advanced questions on SQL/T-SQL (these often separate a true DB
professional from a non-professional)
 Update/Insert Triggers (describe what do they do, what are the system
tables that are exposed during a trigger) [INSERTED/DELETED])
 KNOW THE MERGE STATEMENT, INSIDE AND OUT!!! I’ve
had people come back and tell me they really tripped on
this one

The different transaction isolation levels
o Read uncommitted, read committed [default], repeatable read,
serializable, and snapshot [new to 2005])….the differences between
tem, why you’d use one, etc.





In some cases, you might be asked to write a code sample
with the classic “User A”, “User B” scenario
o Transactions (begin trans, rollback, etc.)
Related to that, they may ask about how you handle errors and exceptions
in T-SQL code (try….catch)
Know the difference between HAVING and WHERE
Know the differences between DELETE and TRUNCATE
In general, go back and study all the T-SQL notes from the first week!

SSIS (SQL Server Integration Services)
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
Name 5 control flows tasks, and 5 data flow tasks, and what they do
Be prepared to list the major functions in BIDS for a package (control flow, data flow, event
handler tabs…..configurations…..variables…package logging) – so remember all the major
BIDS options
What’s the difference between precedence constraints on a CFT and a pipeline connector in
the DFT?
Describe the different ways you can configure a precedence constraint between two tasks in
a control flow
How would you go about adding data from other database (e.g. Oracle, DB2, etc.) into a
SQL Server database?
What are some different examples of file sources in SSIS (flat flat, OLE DB source, Excel,
XML)
How do you handle instances in a package where you don’t know certain pieces of
information until runtime? (like an email server, a database server, a folder, etc)
Write a simple SSIS script to accumulate variables
What are the differences between synchronous data flow tasks and asynchronous data flow
tasks
What are the names of the system variables used to configure a fuzzy lookup/fuzzy grouping
(confidence, similarity, threshold)
How do you deploy SSIS packages, and what are the package deployment destination
options
How do you configure SSIS packages
Name the different ways you can define error handling in SSIS packages (both in the control
flow and data flow)
The difference between type 1 and type 2 SCD (slow changing dimensions)
When you deploy SSIS packages, what is the system database that’s used (MSDB)
What’s the name of the CFT that allows you to create a loop construct (foreach loop
container)
How do you specify transaction support and transaction isolation level in SSIS?
How do you call stored procedures with parameters inside SSIS?
Describe a good use for the Multicast Data Flow task
Some scenarios:
 Suppose you have a set of account managers. You need to send an email that
summarizes orders for each account manager, for all orders placed since the last
run. Describe the tasks you’d use in SSIS to accomplish that
Things to review....the Appdev book, and the SSIS videos
o
Here are some good links with content on interview questions (some of these are part of
public forum discussions, and so certain sections are a bit “chatty”, but there’s still some
very good information in each link)
 http://social.msdn.microsoft.com/Forums/en/sqlintegrationservices/thread/b2ede4
56-ce40-4978-ba86-0b42270da875
 http://www.sqlservercentral.com/Forums/Topic394152-148-1.aspx
 http://msbiravindranathreddy.blogspot.com/2008/11/ssis-questions-andanswers.html
 http://www.dotnetspider.com/forum/158771-Sql-Server-Integration-servicesInterview-questions.aspx
 http://www.techinterviews.com/ms-sql-server-interview-questions (a bit dated,
but still good)
 http://ambals.blogspot.com/2009/06/sql-server-interview-questions-part-1.html (I
debated on this one, because some of the questions are extremely basic…..but this
site is broken up into multiple pages, and there is some decent information)
 http://www.sqlservercentral.com/Forums/Topic394152-148-1.aspx (this page is
kind of “chatty”, but there’s a post by someone in the middle of the page that is
excellent…it covers both SSIS and SSRS questions….I’ve included the same link below
in the SSRS section

SSAS
o
o
o
o
o
o
o
o
o
o
o
o
o
They will ask you to describe a cube and a set of dimensions that you’ve created in the past
What are some of the dimension and fact table processing options (for full and incremental
updates)
Just like with BIDS and SSIS, be able to verbally list all of the tabs in the cube and dimension
editors
Know the difference between attribute relationships and hierarchies, and what they’re for
Many interviewers want to make sure that you know how to do more than simply use the
cube wizard to create cubes - here are some areas where they want to know that you’ve
done some amount of work modifying/tweaking the cube afterwards
 Tweaking Dimension usage (if some measure groups aren’t available for some
dimensions)
 NULL HANDLING
 Overriding of the default AGGREGATION
 Modifying dimensions
 Created hierarchies and attribute relationships
 Setting attribute properties (like Keycolumns, NameColumn, etc.)
What’s the difference between a ROLE and a PERSPECTIVE (you want to be very clear on the
distinction)
Know the (BIG) difference between a security role and role-playing dimension (these two
have nothing to do with each other, but sometimes people confuse them)
The difference between a star and snowflake dimension, and the benefits/advantages
You may get asked a question about drill-through techniques and report actions (what
types of actions are available)
Storage modes: MOLAP/HOLAP/ROLAP (data persistence/storage models)
You very well might get asked MDX questions
 They might ask questions where the answer is going to be a specific MDX statement
and maybe a little bit about the usage
 You be asked to write a MDX snippet, or (more likely) to read four different MDX
examples and indicate which one is correct
 Be prepared to talk about MDX code to do things like calculating a 52-week moving
average, a % of Parent, or “same time a year ago”
KPIs:
 Describe some business examples of KPIs
 What are the possible output(display) values for a KPI
 How would you write a KPI to show how a measure is trending, compared to the
same time a year ago
Here are two VERY GOOD links on SSAS/MDX questions:
 http://www.ssas-info.com/analysis-services-implementations/69-experience/1352dave-rodabaughs-analysis-services-interview-questions
 http://www.datawarehousingguide.com/content/view/122/60/
SSRS
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
Deployment (almost guaranteed) – different types of deployments (native SSRS mode
versus SharePoint mode)
If a user gets an error running a report in a browser, where would you go to view the log?
Implementing Drill-down (#1, you set the hidden and visible props, and you start at the
lowest level, and work your way up, one level shy of the top level)
Name the different report object (table, matrix, textbox), and different chart types that are
available
Remember all the major functionality options in a group (creating a document map,
subtotals, page break behavior, etc.)
If the organization is migrating from Crystal Reports to SSRS, they might ask about options
that are in one, but not the other
Different ways to read data (OLAP and relational sources)
Report Parameters
 Describe a situation where you would use a hidden parameter?
 When does SSRS automatically generate report parameters
How to handle dynamic images
Know the major charts in SSRS, and some of the charting limitations
What’s the difference between a table and a matrix
Major enhancements from 2005 to 2008 to 2008r2
Management of shared data sources
Remember that you can potentially use the URL string of a report to run the report for
certain parameters or certain default output export formats
How do you build a report when you have multiple levels of detail? [subreports]
Report expression (they’ll give you 4 report expressions, you pick the one that’s correct)
Functionality in the Report Manager
 Subscriptions and data driven subscriptons
 Snapshots
 Report history
 Redefining data source credentials for running reports unattended (what
specifically must to be done to report data sources)
Here are some good links with additional topics:
 http://sqlserversolutions.blogspot.com/2011/06/ssrs-interview-questions.html
 http://www.sqlservercentral.com/Forums/Topic394152-148-1.aspx (this page is
kind of “chatty”, but there’s a post by someone in the middle of the page that is
excellent…it covers both SSIS and SSRS questions….I’ve included the same link above
in the SSIS section
Download