Why does import adds columns with 'u_' prefix?

vks
Kilo Expert

I'm working on a scoped application. I'm trying to import data in ServiceNow via an XML file. I have created an import set table with all possible columns and have defined transform map to transform this data into ServiceNow tables.

However when I execute an Import, the import process ignores my columns in the staging/import set table and adds new columns with 'u_' prefix. Why does it do this?

I could find the property glide.import_set_row.dynamically_add_fields which could prevent creation of new columns but I'm not sure if disabling this option would force import to use my columns, my guess is import would fail.

My question is why does the import creates new columns when I have columns in the import set table and if I disable dynamic creation of columns how could I instruct import to use my columns?

Thanks,

Vipin

10 REPLIES 10

Deepak Ingale1
Mega Sage

Hi Vipin,



Import set are staging table used to transform your data into target table of ServiceNow.


Every custom table and every custom column in ServiceNow is created with u_ prefix. Only ServiceNow can create normal table and associated columns without this prefix. This design is created to separate out the customization from OOB configuration which helps in upgrades and many more things.



So, if it is normal that columns got created with u_ prefix.


Also, If you disable the property you have mentioned, I sense it will prevent creating any column dynamically during import based on data source, but it will not help you to create column without u_prefix with this property as disabled


Hi deepak.ingale



Thanks for your reply. My understanding was 'u_' prefix for table and column names is for applications created in global scopes however for private applications this is no more a requirement. I've been able to create all my custom tables and columns in those without this prefix and they seem to work fine.



The problem (rather behavior) occurred only in case of staging (Import Set) tables; the only thing I can make out so far is that since these columns are being manipulated by SN Import Set which is part of global scope, it creates columns with this prefix.



I want to be sure that there is no way (settings) to use non-prefixed columns in these tables.



Thanks again,


Vipin


Hi Vipin,



It is interesting to know about that you can create non-global scope tables for an app without u_prfix. I was not aware of this.


My observation was like, system adds the "scope" name as a prefix for tables created for custom app.



find_real_file.png


Hi Deepak,



That's right, SN adds application namespace as prefix to all tables which is like 'x_*' but NOT 'u_'. Also, the table columns does not require any prefix...


find_real_file.png



Thanks,


Vipin