Facebook data engineer interview: the only post you'll need to read

Practice 1-on-1 with ex-interviewers from Facebook. Learn more.

Data engineer interviews at Facebook are really challenging. The questions are difficult, specific to Facebook, and cover a wide range of topics.

The good news is that the right preparation can make a big difference, and can help you land a data engineer job at Facebook. We have put together the ultimate guide to help you maximize your chances of success.

Here's an overview of what we will cover:

1. Interview process and timeline

What's the Facebook data engineer interview process and timeline? It usually takes around two months and follows these steps:

1.1 What interviews to expect

  1. Application and referrals
  2. Recruiter phone screen
  3. Technical screening
  4. Onsite interviews

Let’s take a look at each of those steps in a bit more detail.

1.1.1 Application and referrals

Step one is getting a Facebook interview in the first place. In this guide we're focusing primarily on the interviews, so we'll keep this portion brief. You can apply to Facebook directly or a recruiter may reach out to you. In either case, it helps to have a quality (and up-to-date) resume that is tailored to front end positions, and to Facebook more specifically. 

If you do have a connection to someone in Facebook, it can be really helpful to get an employee referral to the internal recruiting team, as it may increase your chances of getting into the interview process.

1.1.2 Recruiter phone screen

In most cases, you'll start your interview process with Facebook by talking to an HR recruiter on the phone for 30-45 minutes. They are looking to confirm that you've got a chance of getting the job at all, so be prepared to explain your background and why you’re a good fit at Facebook. You should expect typical behavioral and resume questions like, "Tell me about yourself", "Why Facebook?", as well as some SQL and data structure questions.

If you get past this first HR screen, the recruiter will then help schedule a technical screen with a Facebook engineer. One great thing about Facebook is that they are very transparent about their recruiting process. Your HR contact will therefore walk you through the remaining steps in the hiring process, and will also share with you a helpful email listing resources you can use to prepare.

1.1.3 Technical screening

If you make it past the HR screen you’ll have an hour-long technical screening where you’ll spend half the time on 5 SQL questions and the other half on 5 coding questions.

To provide your answers you'll use a simple online code editor without syntax highlighting or auto-completion (e.g. CoderPad) and it's a good idea to get used to using one of them beforehand. It’s up to you which programming language you use.

1.1.4 Onsite interviews

If you make it past the technical screening you’ll be invited to the real test: a full day of “onsite” interviews at a Facebook office. As you'll see in this really useful Facebook guide, you can expect four interviews in total: three hour-long technical interviews and one 30-minute “ownership” interview.  The questions you’ll face can be grouped into 5 categories:

    1. Coding questions
    2. SQL questions
    3. Data modeling questions
    4. Product sense questions
    5. Ownership questions

In addition to these interviews, you'll also have lunch with a fellow engineer while you are onsite. The lunch interview is meant to be your time to ask questions about what it's like to work at Facebook. The company won't be evaluating you during this time, but we recommend that you behave as if they were.

[COVID note] It's likely that your onsite interviews will be held virtually instead of in-person, given the COVID-19 pandemic. However, your recruiter should be able to provide you with the most up-to-date information on Facebook's onsite interview procedures. Feel free to ask your Facebook recruiter for details after you've been officially invited to participate in the onsite interviews.

1.2 Individual contributors vs managers

Facebook has two career tracks. You can either grow into a manager where you end up leading teams of engineers (management track). Or you can stay very hands-on technically and specialize as you become more senior (individual contributor track).

If you're interviewing as an individual contributor then, as we’ve discussed regarding a data engineer role, you can mainly expect technical interviews and will typically only have a single behavioral (ownership) interview.

However, if you are interviewing as a manager, director, or above, then you should expect at least two interviews that are not technical where you need to answer behavioral questions about how you develop people, work with cross functional teams, execute on projects, grow an organization, etc.

1.3 What happens behind the scenes

Throughout the interview process at Facebook, the recruiter usually plays the role of "facilitator" and moves the process from one stage to the next. Here's an overview of what typically happens behind the scenes:

  • After the technical screen, the interviewer you've talked to will have 24h to submit their ratings and notes to the internal system. Your recruiter then reviews the feedback, and decides to move you to the onsite interview or not depending on how well you've done.
  • After the onsite, your interviewers will make a recommendation on hiring you or not and the recruiter compiles your "packet" (interview feedback, resume, referrals, etc.). If they think you can get the job, they will present your case at the next candidate review meeting.
  • Candidate review meetings are used to assess all candidates who have recently finished their interview loops and are close to getting an offer. Your packet will be analyzed and possible concerns will be discussed. Your interviewers are invited to join your candidate review meeting, but will usually only attend if there's a strong disagreement in the grades you received (e.g. 2 no hires, 2 hires). If after discussion the team still can't agree whether you should get an offer or not, you might be asked to do a follow up interview to settle the debate. At the end of the candidate review meeting, a hire / no hire recommendation is made for consideration by the hiring committee.
  • The hiring committee includes senior leaders from across Facebook. This step is usually a formality and the committee follows the recommendation of the candidate review meeting. The main focus is on fine-tuning the exact level and therefore the compensation you will be offered.

It's also important to note that hiring managers and people who refer you have little influence on the overall process. They can help you get an interview at the beginning, but that's about it.

2. Example questions

As we mentioned above, for the position of Facebook data engineer you'll face questions across five different topics; four technical and one behavioral.

  1. Coding questions
  2. SQL questions
  3. Data modeling questions
  4. Product sense questions
  5. Ownership questions

Now let’s dig a little deeper into those topics. We’ve analyzed scores of candidates’ interview reports on Glassdoor to provide you with real interview questions that have been previously asked by Facebook. We've categorized them and we've changed the grammar and phrasing in some places to make the questions easier to understand.

Let’s get into it.

2.1 Coding questions

Data engineers at Facebook solve some of the company’s biggest challenges with code. Facebook will want to make sure you’ve got the necessary problem-solving skills and that you can think in a structured way when it comes to code. 

You’ll need to know how to manipulate data structures, how to use dictionaries, loops and lists, and show a good understanding of string, set operations, etc, in your coding language of choice. You’ll need to provide  accurate, bug-free, efficient, and well-thought-out code, sharing your thoughts out loud while you work through it on a whiteboard (or online equivalent).

Let’s take a look at some real examples of coding questions that we found in the Glassdoor data.

Example coding questions asked by Facebook in data engineer interviews

  • Given a two dimensional list, for example [ [2,3],[3,4],[5]] person 2 is friends with 3 etc, find how many friends each person has. Note, one person has no friends
  • Can you do the following without using subquery?: {1,None,1,2,None} --> [1,1,1,2,2] Ensure you take care of case input[None] which means None object
  • Complete a function that returns a list containing all the mismatched words (case sensitive) between two given input strings # For example: # - string 1 : "Firstly this is the first string" # - string 2 : "Next is the second string" # # - output : ['Firstly', 'this', 'first', 'Next', 'second']
  • Complete a function that returns the number of times a given character occurs in the given string.
    # For example:
    # - input string = "mississippi"
    # - char = "s"
    #
    # - output : 4


  • Given an array containing None values fill in the None values with most recent non None value in the array. For example:input array: [1,None,2,3,None,None,5,None] # - output array: [1,1,2,3,3,3,5,5]
  • Complete a function that returns a list containing all the mismatched words (case sensitive) between two given input strings # For example: string 1 : "Firstly this is the first string" # - string 2 : "Next is the second string" # # - output : ['Firstly', 'this', 'first', 'Next', 'second']
  • Given an array of integers, we would like to determine whether the array is monotonic (non-decreasing/non-increasing) or not. Examples:
 // 1 2 5 5 8
 // true
 // 9 4 4 2 2
 // true
 // 1 4 6 3
 // false

  //1 1 1 1 1 1 

 // true

  • Given two sentences, construct an array that has the words that appear in one sentence and not the other
  • Given an ip address as an input string, validate it and return True/False
  • Count the neighbors of each node in a graph. Input graph is a multi dimensional list
  • Given a dictionary, print the key for nth highest value present in the dict. If there are more than 1 record present for nth highest value then sort the key and print the first one
  • Flatten a nested dictionary
  • You have a 2-D array of friends like [[A,B],[A,C],[B,D],[B,C],[R,M], [S],[P], [A]]. Write a function that creates a dictionary of how many friends each person has. People can have 0 to many friends. However, there won't be repeat relationships like [A,B] and [B,A] and neither will there be more than 2 people in a relationship
  • What is a loop that goes on forever?
  • Recursively parse a string for a pattern that can be either 1 or 2 characters long
  • Write a simple spell-checking engine
  • Given two sentences, you have to print the words those are not present in either of the sentences.(If one word is present twice in 1st sentence but not present in 2nd sentence then you have to print that word too)

To see more example coding problems asked by Facebook in engineering interviews, check out our Facebook software engineer interview guide. You'll see that those examples come with links to Leetcode solutions.

2.2 SQL questions

Knowledge of SQL is very important for data engineers at Facebook. That’s why they include SQL questions both in the technical screening and the onsite interviews.

The interviewer will test your knowledge of basic SQL constructs. You’ll need to know how to use joins, aggregate functions, analytical functions, set operators, and subqueries, while thinking about efficiency and scalability.

Let’s take a look at some real examples of SQL questions that we found in the Glassdoor data.

Example SQL questions asked by Facebook in data engineer interviews

  • How do you join two tables with all the information on the left one unchanged?
  • Does database view occupy the disk space?
  • Given full authority to ""make it work"", import a large data set with duplicates into a warehouse while meeting the requirements of a business intelligence designer for query speed
  • Find the top 10 colleges/companies that an averagely social person interacts with
  • The ORDER BY command in SQL is automatically set in what format if you didn't set it: Ascending or Descending?
  • When you want to delete or add a column of a table in a database, what command will you use?
  • What command would you want to use if you want to keep all the info of the left table?
  • You want to combine two columns after removing two duplicates, would you use UNION or UNION ALL?
  • What is the term used to select non-duplicates in SQL?
  • Given a raw data table, how would you write the SQL to perform the ETL to get data into a desired format?
  • Perform a merge-sort with SQL only
  • A table has two data entries every day for # of apples and oranges sold. Write a query to get the difference between the apples and oranges sold on a given day
  • Given a database schema showing product sales: calculate what percent of our sales transactions had a valid promotion applied? And what % of sales happened on the first and last day of the promotion?
  • Display the most common name in a table

2.3 Data modeling questions

Facebook is an organization built on collecting huge amounts of data. Modeling that data in the best way possible is therefore very important.

You can expect to be asked to brainstorm the data needs of one of Facebook’s products. You’ll then be asked to design a data mart to support analytics use cases and to write select SQL statements to produce specific results.

Let’s take a look at some real examples of data modeling questions that we found in the Glassdoor data.

Example data modeling questions asked by Facebook in data engineer interviews

  • Present a design of a gaming company data
  • Design a database for an app
  • Design a relational database for a ride-sharing app
  • Given data, design a table schema for this data to be used by a data scientist to query metrics such as process with max average elapsed time, and so they can plot each process
  • Create DDL (table and foreign keys) for several tables in a provided ERD. The ERD contains at least one many-to-many relationship

2.4 Product sense questions

Data engineers play an important role in Facebook’s product development strategy. They therefore need to have a strong product awareness and the ability to hold strategic conversations about a product and its possibilities.

All three technical interviews will be case studies of typical product challenges that Facebook normally solves with data. You’ll need to show that you can think critically about the needs of a product and give solid technical solutions.

Let’s take a look at some real examples of product sense questions that we found in the Glassdoor data.

Example product sense questions asked by Facebook in data engineer interviews

  • Design a dashboard to highlight a certain aspect of the user behaviour
  • How do you calculate unique logins by a user on facebook.com?
  • How would you rate the popularity of a video posted online?
  • How would you check if Facebook should change something in the newsfeed? How would you define the KPI in this case?
  • Design an experiment to test whether a certain feature generates conversation

2.5 Ownership questions

Facebook data engineers need more than just strong technical skills - they need the soft skills that will enable them to leverage this technical knowledge by taking initiative and influencing their fellow engineers and cross-functional partners.

The ownership questions that you’ll be asked are what we call ‘behavioral’ questions. They will aim to assess you on your past behavior, looking to see if you have demonstrated good leadership, communication and teamwork skills. To dig deeper in behavioral questions, check out our guide on how to answer them, as well as our take on the "Why Facebook?" question.

Below we've listed some frequent ownership questions that Facebook tends to ask, according to data from Glassdoor. 

Example ownership questions asked by Facebook in data engineer interviews

  • Tell me about yourself
  • Tell me about a challenge you faced and how you overcame it?
  • Why data engineering?
  • Why Facebook?
  • Tell me about a project you have worked on
  • Describe a situation where you did not agree with the stakeholders. How did you handle it?
  • What product would you want to most work on and why? What would you do if you worked on that project?

3. How to prepare

Now that you know what questions to expect, let's focus on how to prepare. It's no secret that the performance bar at Facebook is high. Some people even go as far as quitting their job to prepare for interviews full time.

This is obviously extreme and not what we recommend doing, but it shows how much effort some candidates are ready to put in. We've listed the four steps we recommend taking to prepare as efficiently as possible below.

3.1 Learn about Facebook’s culture

Most candidates fail to do this. But before investing tens of hours preparing for an interview at Facebook, you should take some time to make sure it's actually the right company for you.

Facebook is prestigious and it's therefore tempting to ignore that step completely. But in our experience, the prestige in itself won't make you happy day-to-day. It's the type of work and the people you work with that will.

If you know engineers who work at Facebook (or used to), it's a good idea to talk to them to understand what the culture is like. In addition, we would recommend reading about Facebook's 5 core values and hacker culture.

3.2 Practice by yourself

To help you further organise your preparation, make sure to read Facebook’s own guide to the data engineer onsite interview. It's a great overview of what to expect and contains some invaluable tips. Then you’ll want to start digging a bit deeper into each of the five types of questions you’ll be facing (coding, SQL, data modeling, product sense, and ownership) and start to practice answering them by yourself.

For coding questions, we recommend reading the following article written by an ex-Facebook interviewer to understand more about the step-by-step approach you should use to solve coding questions in an interview.

And to practice, we recommend using Leetcode, where you can get a lot done with the free tier, and you can also access Facebook-specific questions using the premium tier. If you haven’t already, you should also take a look at our Facebook software engineer interview article for useful example coding questions and additional information. 

For SQL questions, you can also find a lot of practice questions on Leetcode or on this website recommended by Facebook. We also recommend reading this article on the 3 types of SQL questions.

For data modeling questions, learndatamodeling.com has some useful videos that explain some of the core concepts. To practice, take a main product from a top tech company and try and work out how you would model each of its functions. Create logging designs and design data models. This kind of preparation can go a long way in helping you make a strong impression.

For product sense questions, this video offers an easy-to-understand overview and tackles some example questions. It’s aimed at data scientists but is also relevant to data engineers. In addition, we recommend having a close look at Facebook products and thinking hard about their metrics.

For ownership questions, we recommend learning our step-by-step method for answering behavioral questions. In addition, you'll want to write down your answers to the example questions we gave you in the previous section.

Finally, a great way to practice answering interview questions is to interview yourself out loud. This may sound strange, but it will significantly improve the way you communicate your answers during an interview. Play the role of both the candidate and the interviewer, asking questions and answering them, just like two people would in an interview. Trust us, it really helps!

3.3 Practice with peers

Practicing by yourself will only take you so far. One of the main challenges of coding interviews is to have to communicate what you are doing as you are doing it. As a result, we strongly recommend practicing live interviews with a peer interviewing you.

A great place to start is to practice with friends if you can. You can also sign up to the software engineer waitlist on our free mock interview platform. We'll let you know as soon as we've activated the software engineer category (which includes data engineering) so that you can start practicing with other candidates. 

3.4 Practice with ex-interviewers

The main benefit of practicing with peers is that it's free. But at some point you'll start noticing that the feedback you are getting from peers isn't helping you that much anymore. Once you reach that stage, we recommend practicing with ex-interviewers from top tech companies.

If you know a data engineer who has experience running interviews at Facebook or another big tech company, then that's fantastic. But for most of us, it's tough to find the right connections to make this happen. And it might also be difficult to practice multiple hours with that person unless you know them really well.

Here's the good news. We've already made the connections for you. We’ve created a coaching service where you can practice 1-on-1 with ex-interviewers from leading tech companies like Facebook. Learn more and start scheduling sessions today.

cta_illustration arrow_left Browse Facebook ex-interviewers

Any questions about Facebook data engineer interviews?

If you have any questions about Facebook data engineer interviews, don't hesitate to post them in the comments below. All questions are good questions, so go ahead!