Is there a possibility to have different column name on an import table and on a csv file ?

daviago
Kilo Contributor

Hello,

I m currently working on data source to import data.

The customer can only send us a CSV file with the column "état" (for various reasons)

But when the column is created on the staging table with this "u_état" name, we saw issues with update sets and imports

So we would like to know if we could have the column name "u_etat" (or any name without french accent) in the

staging table while the column is still "état" is the CSV file

Regards

1 ACCEPTED SOLUTION

Jaspal Singh
Mega Patron
Mega Patron

Hi David,



It would not be an issue. Yes, your understanding is correct that if we create it in system it would have "u_" prefixed for each column that is created for a table. But it would be Column label that would matter. For instance, when you create a column with label EAT it would have column name as u_eat. However, when loading from .CSV/.EXCEL it would look for column label match & not column name hence would work.



If in case you modify the label in ServiceNow from EAT to EATS & if there is no change made to .CSV/EXCEL file from EAT to EATS then Yes, there would be discrepancy & you will get an Error.


View solution in original post

3 REPLIES 3

kiranhegde
Mega Expert

Hi David,



If you are using Load data where Import set table will be created automatically, then i think you will not be able to change this behaviour.


I don't think there is any scripting possible.



I would also like to know if someone has the solution for this. I do had similar issue, but we worked out with changing the Column name in the excel file itself.




Regards,



Kiran


Jaspal Singh
Mega Patron
Mega Patron

Hi David,



It would not be an issue. Yes, your understanding is correct that if we create it in system it would have "u_" prefixed for each column that is created for a table. But it would be Column label that would matter. For instance, when you create a column with label EAT it would have column name as u_eat. However, when loading from .CSV/.EXCEL it would look for column label match & not column name hence would work.



If in case you modify the label in ServiceNow from EAT to EATS & if there is no change made to .CSV/EXCEL file from EAT to EATS then Yes, there would be discrepancy & you will get an Error.


Hi David,



If you gave this a try & it worked you can mark this thread as correct so that it does not appear in unanswered list.