AWS Data Engineer DEA-C01 · Data Ingestion and Transformation · hard
During an AWS Glue PySpark job, an incoming JSON feed contains a price field that is sometimes an int (25), sometimes a double (25.50), and sometimes a string ("$25.00"). Standard Spark DataFrame schema inference either fails or coerces the entire column to string. Which AWS Glue DynamicFrame method is specifically designed to resolve inconsistent column data types across rows (by casting, projecting, or splitting into separate typed columns)?
Published · Last updated · checked before publication — how we verify questions
Options
Answer: C. DynamicFrame.resolveChoice() with cast or make_cols specs
An AWS Glue DynamicFrame wraps each record in a self-describing DynamicRecord that can hold multiple data types (ChoiceType) in a single field, and provides the .resolveChoice(specs=[...]) transformation (cast:double, make_cols, make_struct, or project:double) to disambiguate polymorphic schemas cleanly.
Why the other options are wrong
- A. df.dropDuplicates() on a standard Spark DataFrame — dropDuplicates removes duplicate rows and does not resolve polymorphic schema types within a column.
- B. df.coalesce(1) to merge all partitions into one file — coalesce(B) reduces partition count on write and has no effect on mixed column data types.
- D. spark.catalog.clearCache() before writing to Amazon S3 — Clearing Spark's in-memory cache does not disambiguate mixed JSON field types.
More Data Ingestion and Transformation questions
- A marketing analytics team needs a no-code, fully managed AWS integration service to pull SaaS opportunity records…
- A business analyst with no PySpark coding experience wants a visual, browser-based interface in the AWS Console to…
- An application produces 18 MB/sec of write throughput across 15,000 events/sec into an Amazon Kinesis Data Stream…
- An AWS Glue PySpark ETL job runs every hour to process newly arrived CSV files in an Amazon S3 bucket…
- A data engineering team is migrating 85 existing open-source Apache Airflow DAGs (written in Python using custom…
- A retail analytics team wants a fully managed, serverless delivery stream that ingests clickstream JSON events…
- You are using AWS Database Migration Service (DMS) to migrate a production Oracle database to Amazon Aurora PostgreSQL…
All Data Ingestion and Transformation questions and the topic overview →
AWS and Amazon Web Services are trademarks of Amazon.com, Inc. PrepIQ Hub is not affiliated with, endorsed by, or sponsored by Amazon Web Services.