I have been using migrate_source_csv (thanks, working on the whole quite well) and I have a CSV with a field that has 1000+ characters. As the migrate_map fields are all varchar 255 it dies. Is there a way to specify the type of fields that migrate_map should use?

Comments

tannerjfco’s picture

This was a bit of confusion I hit initially due to initial naming convention, but if you look at migrate_example_baseball it should help.

  # These are the field names from the source file representing the key
  # uniquely identifying each game - they will be stored in the migration
  # map table as columns sourceid1, sourceid2, and sourceid3.
  identifiers:
    - start_date
    - home_team
    - home_game_number

These are fields that you want to use to track the relationship of source data to imported data - minimally you only need 1 field that uniquely identifies a piece of source content, like a content ID number. Longer fields like body text should not be used to track these relationships.

tannerjfco’s picture

Category: Bug report » Support request
heddn’s picture

Version: » 8.x-1.x-dev

So, a more meaningful error message should be provided. But in the mean time, use something to hash that really long text and store the hash, since the hash will be short enough.

heddn’s picture

Project: Migrate Plus » Migrate Source CSV
Version: 8.x-1.x-dev »
Component: Source plugins » Code

Re-assigning to new project name-space.

heddn’s picture

Project: Migrate Source CSV » Drupal core
Version: » 8.0.x-dev
Component: Code » migration system

This is really a core migrate support question, nothing specific to CSV migrations.

heddn’s picture

Status: Active » Closed (duplicate)