Professional Data EngineerEnsuring solution qualityMedium

A large manufacturing company wants to centralize its operational data from various factory sensors and machinery into a Google Cloud data lake. The data arrives in varying formats and structures, and they need to define and enforce a consistent schema for this data as it lands in Cloud Storage, before being processed by downstream analytics tools. The solution must allow for schema evolution over time without breaking existing pipelines. Which open-source file format, commonly used in the Hadoop ecosystem and supported by Google Cloud, is best suited for this requirement?

  1. APlain Text
  2. BApache Avro
  3. CCSV
  4. DJSON
Show answer & explanation

Correct answer: B. Apache Avro

Apache Avro is an excellent choice for this scenario. It is a row-oriented data serialization format that includes the schema within the data file. This allows for robust schema evolution, meaning you can add new fields or change existing ones without breaking older data or requiring immediate pipeline updates, which is crucial for handling varying formats and future changes in a data lake.

Why the other options are wrong

  • A. Plain Text offers no structure or schema, making it completely unsuitable for structured data processing and schema enforcement requirements.
  • C. CSV is a simple text format without schema enforcement or robust schema evolution capabilities, making it prone to errors with varying data structures.
  • D. JSON is semi-structured and flexible, but lacks strict schema enforcement and efficient binary serialization needed for large-scale, consistent data lakes.

Apache Avro

A row-oriented remote procedure call and data serialization framework developed within the Apache Hadoop project.

  • Includes schema in the data file, enabling schema evolution.
  • Supports rich data structures and efficient binary serialization.
  • Widely used in big data ecosystems for data storage and interchange.

Memory trick: Formats Fuel Future Files.

More Ensuring solution quality questions