• Resolved philbertdog

    (@philbertdog)


    I’ve mastered importing a single CSV file. Extremely useful feature!

    I now wish to import a series of other CSV files containing additional data. I’m wondering if my new CSVs need to include the record id numbers.

    My fields look like this:

    title,url,author,site,summary,publish_date,type,id

    When I created my first CSV I filled the record id fields with numbers 1 to 2,000+. Was that necessary? Or does the system manage the record numbers?

    What do I do with the record id field in the subsequent CSV’s I will be uploading with new data? Leave it blank?

    I’ve uploaded and then deleted all 2,000 records a couple of times as I learned the system so the record ID situation is getting a tad confusing. When I download the CSV from the system it’s now showing IDs with numbers like 8,000+.

    When uploading multiple CSVs what do I need to know about the record ID field, if anything?

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author xnau webdesign

    (@xnau)

    When importing a CSV with an ID, for each record in the CSV, the plugin looks for a record with a matching ID in the database. If it finds it, that record is updated with the incoming data. (if the import is configured in the settings to update matching records)

    If there is no matching ID, the ID value in the CSV is discarded, the record is imported and the ID for the record is automatically generated by the database using its internal counter.

    If you are importing records and then deleting them, the counter is not changed by that, so next time the ID is assigned, it starts with the last number assigned. This is why you are getting those high values in the IDs. If you want to reset the database’s internal counter, you can do that directly in the database, the plugin doesn’t do that.

    If you need to maintain a specific range of numbers as an identifier, you should do that as a separate column, it’s best not to try to use the internal ID number for that purpose.

    Thread Starter philbertdog

    (@philbertdog)

    If there is no matching ID, the ID value in the CSV is discarded, the record is imported and the ID for the record is automatically generated by the database using its internal counter.

    Thank you, this is great. For my purposes I don’t need to be concerned with record IDs, so that just makes things even easier.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Importing Multiple CSV Files’ is closed to new replies.