dkan
dkan copied to clipboard
MySQL Datastore Importer doesn't know how to handle CSV files with empty column headers
Describe the bug
If a CSV file with an empty column header is provided for a dataset, the following error will occur on import:
[error] Import for 7f1142b510169890cf53d6685fcc5e16__1629317226 returned an error: SQLSTATE[42000]: Syntax error or access violation: 1166 Incorrect column name '': CREATE TABLE @datastore_dbdcdbe7dbfe10d6de3784bb24db0f88 (
`record_number` INT unsigned NOT NULL auto_increment,
`lorem_ipsum_dolor_sit_amet_consectetur_adipiscing_elit_sed__1f7b` TEXT DEFAULT NULL,
`` TEXT DEFAULT NULL,
PRIMARY KEY (`record_number`)
) ENGINE = InnoDB DEFAULT CHARACTER SET utf8mb4; Array
(
)
Steps To Reproduce
- Upload a dataset CSV file with an empty column header.
- Attempt to import the dataset.
- Observe the above error.
Expected behavior
The dataset should be imported without issue.