How do I read CSVIssuesReport.csv?


I am using csv-to-org dmigration.

I get "COLUMN DEFINED IN THE SCRIPT IS MISSING IN THE CSV FILE" and "CSV FILE DOES NOT EXIST" warnings for CSVIssues but I don't know how to solve that. I am using "SELECT all" multiselect keyword in the export.json file for my objects as I want all the data.
I was just surprised as I used the "all" option and it was the Plugin that decided which fields are needed.
I still don't understand why it added those fields automatically and then complaining about it. That's my main confusion.

Why do I have these warnings? Do I simply ignore it?

This is my configuration:

    objects: [
         "query": "SELECT all FROM Account",
         "operation": "Upsert",
         "externalId": "Name"

and the csv file:

Name,Phone,TEST__c,TEST2__c,  .......etc
"Account1","+123","TEST1","TEST2",  ....etc
"Account2","+124","TEST21","TEST22",  ....etc
"Account3","+125","TEST31","TEST32",  .....etc


It is important to understand how does the Plugin work with the multiselect keywords and how it validates the source CSV file structure.

The Plugin always acts step-by-step.

In your queries you are using "all" multieselect keyword, meaning "all fields" of the object.
So, the first step would be that the Plugin actually replaces "all" with all object's fields extracted from the object's metadata even you have no source data for some of them.

The second step of the processsing, that the Plugin searches for and scans your source csv file and actually didn't find some corresponding columns to those fields that were extracted by "all" select even you do not want to migrate these fields. This is the meaning of the error: COLUMN DEFINED IN THE SCRIPT IS MISSING IN THE CSV FILE.

This one "CSV FILE DOES NOT EXIST" says, that you are actually missing csv source files for the listed objects. Can be a situation in which your Account object contains custom lookup field to some additional objects that have no corresponding source CSV files. The important point that the Plugin does automatically will add all objects that are referenced via the lookup fields into the processed object set with "Readonly" operation, hence it also requires the source CSV files.

Can you ignore these warnings?

You can ignore the COLUMN DEFINED IN THE SCRIPT IS MISSING IN THE CSV FILE for the columns that you don't need the their data.

CSV FILE DOES NOT EXIST warning is more critical because you are missing source data for those objects and may cause issues of searching for parent lookup records.
You must include csv files for all objects used in your configuration even they were included implicitely.

So, the good approach would be to limit "all" with "excludedFields" property do not include useless fields with missing data.

Last updated on Tu May 2022