I created a ADF copy activity pipeline that moves csv.gz files from Azure blob storage to delta tables in Azure Databricks.
All the data types are of the format string in both the source and sink. 2 files was moved successfully, but the last one keeps failing even though all the files have the same configurations. The pipeline fails with the below error message:
ErrorCode=AzureDatabricksCommandError,Hit an error when running the command in Azure Databricks. Error details: org.apache.spark.SparkException: Job aborted. Caused by: org.apache.spark.SparkException: Exception thrown in awaitResult: Caused by: org.apache.spark.SparkException: Job aborted due to stage failure: Task 0 in stage 38.0 failed 4 times, most recent failure: Lost task 0.3 in stage 38.0 (TID 58) (10.139.64.4 executor driver): com.databricks.sql.io.FileReadException: Error while reading file wasbs:REDACTED_LOCAL_PART@dbtpostgresstorage.blob.core.windows.net/7483a7f6-d13e-4cdb-835e-3f198633241d/AzureDatabricksDeltaLakeImportCommand/listings.txt. Caused by: org.apache.spark.SparkException: Malformed records are detected in record parsing. Parse Mode: FAILFAST. To process malformed records as null result, try setting the option 'mode' as 'PERMISSIVE'. Caused by: org.apache.spark.sql.catalyst.util.BadRecordException: org.apache.spark.sql.catalyst.csv.MalformedCSVException: Malformed CSV record Caused by: org.apache.spark.sql.catalyst.csv.MalformedCSVException: Malformed CSV record Caused by: com.databricks.sql.io.FileReadException: Error while reading file wasbs:REDACTED_LOCAL_PART@dbtpostgresstorage.blob.core.windows.net/7483a7f6-d13e-4cdb-835e-3f198633241d/AzureDatabricksDeltaLakeImportCommand/listings.txt. Caused by: org.apache.spark.SparkException: Malformed records are detected in record parsing. Parse Mode: FAILFAST. To process malformed records as null result, try setting the option 'mode' as 'PERMISSIVE'. Caused by: org.apache.spark.sql.catalyst.util.BadRecordException: org.apache.spark.sql.catalyst.csv.MalformedCSVException: Malformed CSV record Caused by: org.apache.spark.sql.catalyst.csv.MalformedCSVException: Malformed CSV record.