Load and Inspect Public Trip Data

Quick Overview

Design a reproducible program that binds exact green-taxi row and column counts to the downloaded file hash and strict parser configuration.

Load and Inspect Public Trip Data

Company: Capital One

Role: Software Engineer

Category: Data Manipulation (SQL/Python)

Difficulty: medium

Interview Round: Online Assessment

# Load and Inspect Public Trip Data Design a program that downloads the official September 2015 green-taxi trip-record file, loads the raw data into an analytical environment, and emits a run summary containing the exact observed row and column counts. Explain how another analyst can reproduce and verify those counts. Because the dataset itself is external to this practice prompt, do not guess numeric counts without executing against a bound file. ### Constraints & Assumptions - Treat the downloaded file as a versioned external input rather than embedding it in code. - The initial shape must not silently exclude malformed rows or columns. - Record the resolved source, filename, retrieval time, byte size, parser configuration, and content hash. ### Clarifying Questions to Ask - Which published format and revision is authoritative? - Should the reported shape describe the strict raw parse or a separately cleaned table? - How should a parse failure or changed upstream file be reported? ```hint Bind the shape to the bytes The row and column numbers are meaningful only when the program records exactly which file and parser produced them. ``` ### What a Strong Answer Covers - Safe acquisition, failure handling, and file-integrity evidence. - Strict loading with explicit parser options and schema inspection. - A machine-readable `row_count` and `column_count` taken directly from the loaded table. - Run instructions, input hashing, revisions, malformed records, and larger-than-memory handling. ### Follow-up Questions 1. How would you compare two runs when the upstream publisher replaces the file? 2. How would you count rows and inspect schema without loading the full dataset into memory?

Overview: Design a reproducible program that binds exact green-taxi row and column counts to the downloaded file hash and strict parser configuration.

|Home/Data Manipulation (SQL/Python)/Capital One
Capital One logo
Capital One
Sep 27, 2020
mediumSoftware EngineerOnline AssessmentData Manipulation (SQL/Python)
1
0

Load and Inspect Public Trip Data

Design a program that downloads the official September 2015 green-taxi trip-record file, loads the raw data into an analytical environment, and emits a run summary containing the exact observed row and column counts. Explain how another analyst can reproduce and verify those counts. Because the dataset itself is external to this practice prompt, do not guess numeric counts without executing against a bound file.

Constraints & Assumptions

  • Treat the downloaded file as a versioned external input rather than embedding it in code.
  • The initial shape must not silently exclude malformed rows or columns.
  • Record the resolved source, filename, retrieval time, byte size, parser configuration, and content hash.

Clarifying Questions to Ask Guidance

  • Which published format and revision is authoritative?
  • Should the reported shape describe the strict raw parse or a separately cleaned table?
  • How should a parse failure or changed upstream file be reported?

What a Strong Answer Covers Guidance

  • Safe acquisition, failure handling, and file-integrity evidence.
  • Strict loading with explicit parser options and schema inspection.
  • A machine-readable row_count and column_count taken directly from the loaded table.
  • Run instructions, input hashing, revisions, malformed records, and larger-than-memory handling.

Follow-up Questions Guidance

  1. How would you compare two runs when the upstream publisher replaces the file?
  2. How would you count rows and inspect schema without loading the full dataset into memory?
Loading comments...