When we use synchro datasource, then if we use csv with column headers, first column(index 0) is always ignored. When observing debug logs, the column is shown in Columns array but it is not replaced with the tag in params.local.xml
It ignores this 1st column for all operations.
I have attached the CSV file, params and debug logs.
I just figured out the reason why 1st column was getting ignored. It was because of the presence of BOM characters. In my csv file these BOM characters were not visible, so I assumed that it is ignoring the 1st column when infact it was unable to match the column name.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
However, I do have 1 more query. As far as I know, we need primary_key column to process records using synchro. However, my primary key is mapped to HOSTNAME column which I need to display on UI too. So how can I map this column to both primary_key column and HOSTNAME column? For now I am using awk to copy the column with PRIMARY as header and then map PRIMARY to primary_key while mapping HOSTNAME to Hostname.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
When we use synchro datasource, then if we use csv with column headers, first column(index 0) is always ignored. When observing debug logs, the column is shown in Columns array but it is not replaced with the tag in params.local.xml
It ignores this 1st column for all operations.
I have attached the CSV file, params and debug logs.
Last edit: Shantnu Jain 2024-02-27
Hello,
What do you mean by 'ignored' ?
Is the column present and filled in the synchro data table ?
I just figured out the reason why 1st column was getting ignored. It was because of the presence of BOM characters. In my csv file these BOM characters were not visible, so I assumed that it is ignoring the 1st column when infact it was unable to match the column name.
However, I do have 1 more query. As far as I know, we need primary_key column to process records using synchro. However, my primary key is mapped to HOSTNAME column which I need to display on UI too. So how can I map this column to both primary_key column and HOSTNAME column? For now I am using awk to copy the column with PRIMARY as header and then map PRIMARY to primary_key while mapping HOSTNAME to Hostname.