11-17-2023 01:39 AM - last edited on 11-17-2023 08:56 AM by dmiller
Hello,
I would like to delete/replace some characters (typically .) from headers in xlsx or csv file before loading the file in SQL Server using bulk load.
Does someone has any idea ?
Thanks.
Solved! Go to Solution.
11-22-2023 08:39 AM
Mapper with :
$.mapKeys((value,key) => key.replace("'",""))
before bulk load solve the problem.
11-20-2023 04:33 AM
@ChristopheFr - Welcome to the Community!
You can read the file using a File Reader and CSV or Excel Parser, then use a Mapper or Structure snap to rename the columns, then use the SQL Server Bulk Load snap to push the data into the database.
11-20-2023 04:41 AM
Thank you for your reply.
The main point is that I want something generic because I have n Excel files to load in n SQL tables.
n varies all the days, And the structure of a file may vary from one day to another.
That's why I was wandering if there is a possibility to have something like
$.ExcelHeader.replace("'", "")
11-22-2023 08:39 AM
Mapper with :
$.mapKeys((value,key) => key.replace("'",""))
before bulk load solve the problem.