Populate computer asset tag with csv file

joe_farage
New Contributor III

Hi,

I have a csv file like that:

serial_number;asset_tag

I want to update the asset tag for computers with mysql queries. I can't find where is stored the computer serial number in the db.
I found there is a table computers_denormalized, so I updated the asset_tag for each computer but I cannot see these changes in JSS backend.
Thanks for your help!
kind regards
joe

3 REPLIES 3

joe_farage
New Contributor III

I could successfully do that.
1) created a temp table 'test' and populated it with csv data. (LOAD DATA INFILE...)
2) update computers as c Inner join computers_denormalized as cd on c.computer_id = cd.computer_id Inner join test as t on t.serial_number = cd.serial_number Set c.asset_tag = t.asset_tag

tmagdziasz
New Contributor III

When does computer_denormalized get updated?

joe_farage
New Contributor III

It takes some time to be updated, but finally it does.