Skip to main content
Question

Populate computer asset tag with csv file

  • August 20, 2014
  • 3 replies
  • 23 views

Forum|alt.badge.img+5

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

Forum|alt.badge.img+5
  • Author
  • Contributor
  • 29 replies
  • August 25, 2014

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
Forum|alt.badge.img+4
  • Contributor
  • 23 replies
  • September 5, 2014

When does computer_denormalized get updated?


Forum|alt.badge.img+5
  • Author
  • Contributor
  • 29 replies
  • September 17, 2014

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