cancel
Showing results for 
Search instead for 
Did you mean: 

Delete some characters from header before bulk load

ChristopheFr
New Contributor II

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.

1 ACCEPTED SOLUTION

ChristopheFr
New Contributor II

Mapper with :
$.mapKeys((value,key) => key.replace("'",""))
before bulk load solve the problem.

View solution in original post

3 REPLIES 3

koryknick
Employee

@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.

ChristopheFr
New Contributor II

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("'", "")

ChristopheFr
New Contributor II

Mapper with :
$.mapKeys((value,key) => key.replace("'",""))
before bulk load solve the problem.