Everton1878 Posted June 24, 2016 Share Posted June 24, 2016 I've been doing some more testing with the Asset Import Utility and it now seems to be duplicating entries rather than updating the ones that already exist It wasn't doing this when I first started testing it a few weeks ago, I've now got 3 entries per machine Has anything changed in Service Manager recently that may have caused this? I would have thought that it would look at the machine name as being a primary key and not allow duplicates cheers, Pete Link to comment Share on other sites More sharing options...
Guest Posted June 27, 2016 Share Posted June 27, 2016 Hi Pete, Nothing should have changed relating to this recently. This is usually down to a configuration issue in the conf.json file. The unique identifier (from the DB) needs to be written in the h_name column of both the AssetGenericFieldMapping and AssetTypeFieldMapping objects. Otherwise the tool can’t work out if there are duplicates or not. So as a very basic example (taking some extracts from the conf.json file: ...... "AssetID": "ComputerName" "Query": "SELECT [ComputerName], [Manufacturer] from DatabasesAssets ...... "AssetGenericFieldMapping":{ "h_name": "[ComputerName]", ...... If the unique identfier from the DB is not descriptive enough to be useful as the asset name, then you could always concatenate this and another column in the SQL query to create a value to be used as the unique identifier. If you still have issues, it may be worth posting the relevant extract from your conf file here (obviously ensuring not to post any sensitive or password/security information). Kind Regards Bob Link to comment Share on other sites More sharing options...
Everton1878 Posted June 28, 2016 Author Share Posted June 28, 2016 Hi Bob, I've made a change to the config file and ran the import twice It didn't duplicate anything, I'll keep my eye on it and run some more tests Thanks for your help, Pete Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now