FastPrepETL Pipeline Scheduler
Problems/ETL Pipeline Scheduler

ETL Pipeline Scheduler

Unity logoUnity● MediumFULLTIMEONSITE INTERVIEW

Updated Nov 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: The interview report names building a lightweight ETL pipeline scheduler. The finite dependency graph, the lexicographic tie rule, the result for a cycle, the interface, the examples, and the limits are our additions. Our version is about 55% the same as the reported question.

An ETL pipeline contains uniquely named jobs and dependency edges. A dependency [before, after] means job before must finish before job after can run.

Return one valid execution order. Whenever several jobs are ready, choose the lexicographically smallest job identifier, so there is only one right answer. If the dependencies contain a cycle, return an empty array.

Function

scheduleEtlPipeline(jobIds: String[], dependencies: String[][]) → String[]

Examples

Example 1

jobIds = ["extract","transform","load"]dependencies = [["extract","transform"],["transform","load"]]return = ["extract","transform","load"]

Job extract has no prerequisite, so it goes first. Transform needs extract, and load needs transform. The order is extract, transform, load.

Example 2

jobIds = ["load_b","extract","load_a"]dependencies = [["extract","load_a"],["extract","load_b"]]return = ["extract","load_a","load_b"]

Job extract goes first. After that, load_a and load_b are both ready. The name load_a comes before load_b, so load_a goes next.

Example 3

jobIds = ["a","b"]dependencies = [["a","b"],["b","a"]]return = []

Job a must come before b, and b must come before a. That is a cycle, so no order works and the answer is an empty array.

Constraints

  • 1 <= jobIds.length <= 20000.
  • Job identifiers are unique nonempty ASCII strings.
  • 0 <= dependencies.length <= 50000; every edge contains two known, different identifiers and edges are distinct.

More Unity interview questions

  • Directed Path ExistenceOA · Seen Jan 2022

Similar questions at other companies

  • Course Schedule IIAmazon · PHONE SCREEN · ONSITE INTERVIEW
  • Lexicographically Smallest Topological OrderByteDance · PHONE SCREEN · ONSITE INTERVIEWByteDance interview questions
  • Merge Subsequences Into a Consistent Total OrderGoogle · PHONE SCREEN · ONSITE INTERVIEWGoogle interview questions
  • Topological Sort with Secondary OrderingRoblox · PHONE SCREEN · ONSITE INTERVIEWRoblox interview questions
  • Lexicographically Smallest Course OrderLinkedIn · ONSITE INTERVIEWLinkedIn interview questions
  • Microservice Deployment OrderGoldman Sachs · ONSITE INTERVIEWGoldman Sachs interview questions
  • Course Schedule IIWalmart · ONSITE INTERVIEWWalmart interview questions
  • Task Order With PrerequisitesDoorDash · PHONE SCREEN · ONSITE INTERVIEWDoorDash interview questions
  • Course Schedule IIBloomberg LP · ONSITE INTERVIEWBloomberg LP interview questions
  • Task Order with Smallest Ready Task FirstExpedia · ONSITE INTERVIEWExpedia interview questions
See Unity hiring insights
Saved
class Solution {
    public String[] scheduleEtlPipeline(String[] jobIds, String[][] dependencies) {
        // Write your code here.
    }
}
Checking account…