Querying Hardware_reports and computers tables

acdesigntech
Contributor II

I've been tasked with grabbing the following information from the jamfsoftware database on a nightly basis to support our new service cloud infrastructure:

make, model, serial number, and top display name (username that most often logs in).

This is easy enough using the API, but requirements have changed from "just Get the info and put it here" to "we need to get the info using a JDBC connection so now you have to re-write all of your queries after months of us saying this works perfectly. Sorry, but better you than us." (sorry was that last part out loud?)

Anyway, I need to extract the two tables; hardware_reports and computers, but they don't share a single key between them, and I haven't the first clue how to join the tables in a way that will let me select out of each.

Does anyone have any experience with this? ALso, does anyone know where the username field gets stored? I'm populating it with a dscl call followed by a recon -username to get that info in the DB, but have yet to find where that info is actually stored.

0 REPLIES 0