New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Import error -> Row 1 doesn't contain data for all columns #20
Comments
Hello, "entity_id" field will never be in CSV file, a link between akeneo code and entity id in Magento is done. In CSV file, is field separator "semi-colon" ? In Magento database, check "tmp_*" table after import failed, and check the columns. |
I do not know if I am the only one with this problem but if not, a couple of possible solutions I can think about are as follows: Option 1.- Move addColumn('entity_id' ...) into matchEntity method. That way, the column will not exist at the time loadDataInfile is executed Let me know what you think about that. |
Just in case that someone has the same problem I found a solution for that. It turns out to be a problem of the mysql configuration. The problem comes from STRICT_TRANSTABLES in the sql_mode configuration.
This should fix the issue and the import will then work. |
@jalogut can confirm that worked... thanks for sharing a solution 👍 |
Hi @jalogut , Mysql2::Error: Row 1 was truncated; it contained more data than there were input columns: LOAD DATA INFILE |
Hi @jaswinderahuja, Did you remove "strict_trans_tables" sql_mode from your mysql configuration (my.cnf)? That was my problem, nothing to do with the encoding. |
Hi @jalogut, yes i removed SRICT_TRANS_TABLES from my.cnf. but issue was with LOAD DATA INFILE ....... LINES TERMINATED BY '\r\n' and in LINUX it was only '\n' so that solved this. I think reason behind was data and no of columns was mismatching because of this. Thanks!!. |
I get the following error with all the imports:
SQLSTATE[01000]: Warning: 1261 Row 1 doesn't contain data for all columns
I think it is because the "entity_id" column is not into the .csv file and then the number of columns in the temporal table differ with the ones in the source file.
Do you know how can I solve this issue?
The text was updated successfully, but these errors were encountered: