Skip to content

BulkDecompressor -- Error writing failures CSV file #33

@alec-ferguson-sunrun

Description

@alec-ferguson-sunrun

When BulkDecompressor tries to write an error CSV file, seeing this stack trace:

Caused by: java.lang.IllegalArgumentException: No quotes mode set but no escape character is set
	at org.apache.commons.csv.CSVFormat.validate(CSVFormat.java:1397)
	at org.apache.commons.csv.CSVFormat.<init>(CSVFormat.java:647)
	at org.apache.commons.csv.CSVFormat.withQuoteMode(CSVFormat.java:1832)
	at com.google.cloud.teleport.templates.BulkDecompressor.lambda$run$9962e4b6$1(BulkDecompressor.java:234)
	at org.apache.beam.sdk.transforms.Contextful.lambda$fn$36334a93$1(Contextful.java:112)
	at org.apache.beam.sdk.transforms.MapElements$1.processElement(MapElements.java:123)

From reading the CSVFormat code, it looks like you need to call withEscape() before you call withQuoteMode(). I will have a pull request to fix this shortly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions