3 weeks ago
- last edited
3 weeks ago
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.
2 weeks ago
Mapper with :
$.mapKeys((value,key) => key.replace("'",""))
before bulk load solve the problem.
3 weeks ago
@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.
3 weeks ago
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("'", "")
2 weeks ago
Mapper with :
$.mapKeys((value,key) => key.replace("'",""))
before bulk load solve the problem.