
Answer-first summary for fast verification
Answer: Provide schema hints to specify the expected data types for certain columns.
The correct solution is to provide schema hints. This approach allows you to specify the expected data types for known columns before the data is loaded. For example, using `.option("cloudFiles.schemaHints", "id int, description string")` in your code ensures that the 'id' column is treated as an integer and 'description' as a string. This method is effective when the schema inference during the load process does not accurately reflect the intended data types.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
While using AUTO LOADER, you observe that most columns are inferred as string data types, even those meant to be integers. How can this issue be resolved?
A
Update the checkpoint location to enforce correct data types.
B
Provide the schema of the target table in the cloudfiles.schemalocation.
C
Correct the incoming data by explicitly casting the data types.
D
Provide schema hints to specify the expected data types for certain columns.
E
Provide the schema of the source table in the cloudfiles.schemalocation.
No comments yet.