Menu

Synchro Datasource ignores first column in CSV

2024-02-27
2024-03-04
  • Shantnu Jain

    Shantnu Jain - 2024-02-27

    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
  • Pierre Goiffon

    Pierre Goiffon - 2024-03-01

    Hello,
    What do you mean by 'ignored' ?
    Is the column present and filled in the synchro data table ?

     
  • Shantnu Jain

    Shantnu Jain - 2024-03-04

    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.

     
  • Shantnu Jain

    Shantnu Jain - 2024-03-04

    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.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.