Data Ingestion and Transformation

An AWS Glue job converts CSV customer records to Parquet. Customer identifiers such as 00127 must retain their leading zeros; what should the engineer do?

Show the answer

Correct answerB. Define the identifier column as a string before writing

AWhy not this: Compression changes physical storage size, not the identifier's logical type or value.

BWhy this is right: Reading and writing identifiers as strings preserves leading zeros as part of their values.

CWhy not this: Partitioning organizes output records but does not prevent numeric conversion from removing zeros.

DWhy not this: Integer conversion treats leading zeros as insignificant and removes them.

A string schema preserves the identifier's original characters, including leading zeros. Casting to an integer discards those zeros; compression and partitioning do not correct that loss.