I got this to work by using customSchema with DDL syntax.
Example:
.option("customSchema", "ID INT, CustomerName STRING")