Skip to content

CSV and JSON search outputs have different shapes #19

Open

Description

@matthewberry

The CSV branch of /api/v1/search writes raw DB rows, while JSON maps them through CLEANDataBase. As a result:

  • Column names differ: protein_name/protein, ncbi_taxid/ncbi_tax_id, enzyme_function/function, protein_sequence/sequence, uniprot_id/uniprot.
  • CLEAN predictions are two parallel ;-joined columns in CSV but predicted_ec: [{ec_number, score}] in JSON.
  • A column change has to be made in two places.

Aligning them (flattening the model for CSV, or array_to_string in SQL) would change existing CSV column names, so it needs a decision about CSV consumers.

Raised in review of #17.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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