CSV data header row whitespace needs to be cleaned up

Created on 3 October 2023, about 1 year ago

Problem/Motivation

If a CSV getting directly from a url and the CSV is not editable from the url itself. Then if the header row of the CSV has whitespace in there, while creating index fields, it creates the field names with the whitespace in elastic search.

Steps to reproduce

1. Add a CSV source from a url and make sure the source CSV headers has whitespace in them.
2. Index the CSV into the elastic search and it will create the field name with the white space.

Proposed resolution

In the extractDataFromDataSet function, trim the white space from the array which holds the header row.
$file_header_row = array_map('trim', $file_header_row);

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Needs work

Version

1.0

Component

Code

Created by

πŸ‡¦πŸ‡ΊAustralia Nadim Hossain

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024