Skip to content

Taxonomy import: Concept scheme associations not preserved during CSV->JSON->import workflow #3066

@gheorghe-porohnea

Description

@gheorghe-porohnea

Bug Description

When exporting taxonomy to CSV, modifying it, converting back to JSON, and re-importing, all concept scheme associations are lost. Concepts are imported successfully but show empty "conceptSchemes": [] arrays instead of being associated with their parent concept scheme.

Steps to Reproduce

  1. Export taxonomy using: contentful organization taxonomy-export --organization-id <ORG_ID> --format=csv
  2. Modify the CSV file (add/edit concepts)
  3. Convert CSV back to JSON format using a transformation script that properly sets conceptSchemes arrays
  4. Import using: contentful organization import --organization-id <ORG_ID> --content-file taxonomy-import.json
  5. Export again to verify: concepts show "conceptSchemes": [] instead of proper associations

Expected Behavior

Concepts should maintain their associations with concept schemes after import, showing proper references like:

"conceptSchemes": [{
  "sys": {
    "id": "contentTaxonomy",
    "type": "Link",
    "linkType": "TaxonomyConceptScheme"
  }
}]

Actual Behavior

All imported concepts have empty concept scheme associations:
"conceptSchemes": []

Environment

  • Contentful CLI version: 3.8.8
  • Node.js version: v23.11.0
  • OS: macOS 14.5.0

Additional Context

  • The import command reports success without errors
  • New concepts are created successfully
  • Existing concepts are updated successfully
  • Only the concept scheme associations are lost
  • The JSON transformation script correctly generates the conceptSchemes arrays before import
  • This appears to be a CLI import issue rather than a data transformation issue

Workaround Needed

Currently looking for alternative approaches such as:

  1. Using Management API directly to set associations
  2. Different CLI commands that preserve associations
  3. Alternative export/import workflows

Is this expected behavior or a bug? The documentation suggests associations should be preserved during import.

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