er, i guess that's what you mean by "doing it locally"
no, the musicbrainz folks will not run arbitrary sql queries on your behalf :)
(anything you can do via the apis you're welcome to do, of course)
em7272
yeah lol sorry just was wondering if it was hosted online anywhere, thank you for the help!!
crism
em7272, what exactly are you trying to achieve? If you’re trying to import a subset of MBz data into a local database, there are a few different things you could do… but if there’s a particular problem you’re trying to solve or question to answer, there might be a variety of solutions.
not super well-versed with this so bear with me but i'd like to get just the artists and area columns from the basic database without the rest
that api search link looks promising thank you kepstin!
kepstin
I'm not sure what you mean by "artist columns"
artists aren't a single column pretty much anywhere in musicbrainz - and artists of what? tracks, recordings, releases, release groups, etc.?
crism
Be warned that “the basic database” isn’t… it’s a brilliantly complicated mess of join tables, aggressively normalized.
em7272
sorry literally just artist names
kepstin
but artists have multiple names
and recordings, releases, etc can have multiple artists
you have to be more specific about what you want :)
MRiddickW joined the channel
em7272
a list of artist names with their associated area .. is that possible
kepstin
i don't see any way to do that without building a custom query against the full db.
(note that our artist-area information isn't particularly complete)
rdswift
Also bear in mind that there are just over 1.9 million artist records in the database.
kepstin
technically that information is all in the search index together
but paging through all the results of the search api for all 1.9 million artists.. would take a while :)
rdswift
Yup. Sounds like running a local copy of the database is the way to go.
crism
I would just download the full thing, do some subsetting queries, export the results, and run with that. If you’re hurting for space, spin up a free-tier AWS instance to do the work.
rdswift
👍
em7272
thank you so much for your help crism kepstin rdswift this is all very good to know
kepstin
(if you go at max permitted rate and don't get blocked it would take about 5½ hours to pull this all from the api, heh)
rdswift
Actually, that might be less time than it takes to set up the database locally. ;-)
kepstin
yeah, but if you decide you want some extra information later you can amortize the database setup time
for your use case since you'd just want to do queries in the database, consider using the 'mbdata' tool (linked from the docs) rather than doing a full server setup.
alternatively, there's a docker setup nowadays that's simpler than the old days of manual setup :)
rdswift
"but if you decide you want some extra information later you can amortize the database setup time"... Exactly the reason I would download the whole thing and query it locally.