Skip to content

csv adapter repeats headerΒ #190

@twiggler

Description

@twiggler

We got a report from a user that the following keeps repeating headers:

target-query -f mft ./2020JimmyWilson.E01 | rdump -C > broken-csv.mft.csv

When using the default_formatter, the mft plugin cycles through multiple record descriptors.

Because the csv adapter compares the record descriptor with the previous descriptor to determine if the
header should be written, it writes multiple headers.

According to the grammar in RFC 4180 a csv file consists of a single optional header followed by one or more records, where each record has the same number of fields.

Maybe it makes more sense to let the header be the union of all possible record fields. But perhaps these are not known in advance.

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